fourdst::libcomposition v1.5.2
Robust atomic species information library
Loading...
Searching...
No Matches
exceptions_composition.h
Go to the documentation of this file.
1#pragma once
2
3#include <exception>
4#include <string>
5
14 class CompositionError : public std::exception {
15 protected:
19 std::string m_message;
20 public:
25 explicit CompositionError(const std::string& message)
26 : m_message(std::move(message)) {}
27
32 const char* what() const noexcept override{
33 return m_message.c_str();
34 }
35 };
36
44 class CompositionEntryError : public std::exception {
45 protected:
49 std::string m_message;
50 public:
55 explicit CompositionEntryError(const std::string& message)
56 : m_message(std::move(message)) {}
57
62 const char* what() const noexcept override {
63 return m_message.c_str();
64 }
65 };
66
77
85
96
104
114
122
130
138
148
149}
std::string m_message
The error message.
const char * what() const noexcept override
Returns the error message.
CompositionEntryError(const std::string &message)
Constructs a CompositionEntryError with an error message.
const char * what() const noexcept override
Returns the error message.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.
Exception thrown due to a conflict in composition modes at the entry level.
CompositionEntryError(const std::string &message)
Constructs a CompositionEntryError with an error message.
Exception thrown when an operation is attempted on a composition that has not been finalized.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.
Exception thrown when attempting to initialize a composition entry that has already been initialized.
CompositionEntryError(const std::string &message)
Constructs a CompositionEntryError with an error message.
Exception thrown when the finalization process of a composition fails.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.
Exception thrown when a composition is in an invalid or inconsistent state.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.
Exception thrown for an invalid or unsupported mixing mode.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.
Exception thrown for an invalid chemical species symbol in a composition entry.
CompositionEntryError(const std::string &message)
Constructs a CompositionEntryError with an error message.
Exception thrown when a symbol used in a composition is invalid.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.
Exception thrown when a symbol is used that has not been registered.
CompositionError(const std::string &message)
Constructs a CompositionError with an error message.