From df819d120610b7d3737f8b8e2ad03b7e88fb924c Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sat, 3 Aug 2024 19:25:12 -0400 Subject: Add error kind and error message checks to empty tests Add conditional logging for valid path in errors Remove error ending newlines --- src/openvic-dataloader/DiagnosticLogger.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/openvic-dataloader/DiagnosticLogger.hpp') 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)...).c_str()); }); - impl.write_path(iter, file().path()); + if constexpr (!std::same_as) { + 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()) -- cgit v1.2.3-56-ga3b1