aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/detail/Errors.hpp
blob: f8ed21bbe6a9ecfcd0ce23046cb4f00a35476557 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include "openvic-dataloader/v2script/Parser.hpp"

namespace ovdl::v2script::errors {
   inline const v2script::Parser::Error make_no_file_error(const char* file_path) {
      std::string message;
      if (!file_path) {
         message = "File path not specified.";
      } else {
         message = "File '" + std::string(file_path) + "' was not found.";
      }

      return v2script::Parser::Error { Parser::Error::Type::Fatal, message, 1 };
   }
}

namespace ovdl::ovscript::errors {
}