aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/DiagnosticLogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-dataloader/DiagnosticLogger.cpp')
-rw-r--r--src/openvic-dataloader/DiagnosticLogger.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/openvic-dataloader/DiagnosticLogger.cpp b/src/openvic-dataloader/DiagnosticLogger.cpp
new file mode 100644
index 0000000..aae3dcb
--- /dev/null
+++ b/src/openvic-dataloader/DiagnosticLogger.cpp
@@ -0,0 +1,16 @@
+#include <openvic-dataloader/DiagnosticLogger.hpp>
+
+using namespace ovdl;
+
+DiagnosticLogger::operator bool() const {
+ return !_errored;
+}
+
+bool DiagnosticLogger::errored() const { return _errored; }
+bool DiagnosticLogger::warned() const { return _warned; }
+
+
+NodeLocation DiagnosticLogger::location_of(const error::Error* error) const {
+ auto result = _map.lookup(error);
+ return result ? *result : NodeLocation{};
+} \ No newline at end of file