PRISM
 v0.0.0
Loading...
Searching...
No Matches
InvalidInput.h
1#pragma once
2
3#include <stdexcept>
4#include "yaml-cpp/yaml.h"
5
6namespace prism
7{
9class InvalidSpecies : public std::exception
10{
11
12public:
17 InvalidSpecies(const std::string & name, const std::string & message);
18
20 const char * what() const noexcept override;
21
22private:
24 std::string _error;
25};
26
28class InvalidReaction : public std::exception
29{
30
31public:
36 InvalidReaction(const std::string & name, const std::string & message);
37
39 const char * what() const noexcept override;
40
41private:
43 std::string _error;
44};
45
47class InvalidInput : public std::exception
48{
49public:
54 InvalidInput(const std::string & message);
60 InvalidInput(const YAML::Node & node, const std::string & message);
62 const char * what() const noexcept override;
63
64private:
66 std::string _error;
67};
68
73void InvalidInputExit(const std::string & message);
80void InvalidInputExit(const YAML::Node node, const std::string & message);
89void
90InvalidInputExit(const YAML::Node node, const std::string & block, const std::string & message);
91}
Custom exception for when there is some more general error in the input file.
Definition InvalidInput.h:48
const char * what() const noexcept override
custom what for the custom error message
Definition InvalidInput.C:45
InvalidInput(const std::string &message)
Constructor for just giving an error with no additional yaml input context.
InvalidInput(const YAML::Node &node, const std::string &message)
Constructor that will give additional context of the inputfile section that is invalid.
Custom exception for when there is an issue in creating a reaction object.
Definition InvalidInput.h:29
InvalidReaction(const std::string &name, const std::string &message)
Definition InvalidInput.C:20
const char * what() const noexcept override
custom what for the custom error message
Definition InvalidInput.C:26
Custom Exception when there is an issue in creating a species object.
Definition InvalidInput.h:10
const char * what() const noexcept override
custom what for the custom error message
Definition InvalidInput.C:15
InvalidSpecies(const std::string &name, const std::string &message)
Definition InvalidInput.C:9