diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-08-04 01:25:12 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-08-04 01:58:53 +0200 |
commit | df819d120610b7d3737f8b8e2ad03b7e88fb924c (patch) | |
tree | 210f992e56a32a832bc775a5b2c73f032bb3aca0 /src/openvic-dataloader | |
parent | 2addc7763556ff76809f14e2063d1452aa9d6275 (diff) |
Add error kind and error message checks to empty testsfixup/errors
Add conditional logging for valid path in errors
Remove error ending newlines
Diffstat (limited to 'src/openvic-dataloader')
-rw-r--r-- | src/openvic-dataloader/DiagnosticLogger.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openvic-dataloader/DiagnosticLogger.hpp b/src/openvic-dataloader/DiagnosticLogger.hpp index 8c491ca..479a7a0 100644 --- a/src/openvic-dataloader/DiagnosticLogger.hpp +++ b/src/openvic-dataloader/DiagnosticLogger.hpp @@ -398,8 +398,13 @@ namespace ovdl { [&](auto out, lexy::visualization_options) { return lexy::_detail::write_str(out, fmt::format(fmt, std::forward<Args>(args)...).c_str()); }); - impl.write_path(iter, file().path()); + if constexpr (!std::same_as<T, error::BufferError>) { + if (file().path() != nullptr && file().path()[0] != '\0') { + impl.write_path(iter, file().path()); + } + } + output.pop_back(); auto message = intern(output); error->_set_message(message); if (!error->is_linked_in_tree()) |