summaryrefslogtreecommitdiff
path: root/src/core/Exceptions.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Exceptions.hpp')
-rw-r--r--src/core/Exceptions.hpp45
1 files changed, 9 insertions, 36 deletions
diff --git a/src/core/Exceptions.hpp b/src/core/Exceptions.hpp
index a5d50d5..00d6106 100644
--- a/src/core/Exceptions.hpp
+++ b/src/core/Exceptions.hpp
@@ -81,8 +81,8 @@ private:
* reported to the runtime environment.
*/
static std::string formatMessage(const std::string &msg,
- const std::string &file, bool fatal,
- int line, int column);
+ const std::string &file, int line,
+ int column);
public:
/**
@@ -96,12 +96,6 @@ public:
const std::string file;
/**
- * If set to true, the exception should not be handled as recoverable error
- * but as "fatal" error.
- */
- const bool fatal;
-
- /**
* Line at which the exception occured. Negative values are ignored.
*/
const int line;
@@ -118,14 +112,12 @@ public:
* @param file provides the context the message refers to. May be empty.
* @param line is the line in the above file the message refers to.
* @param column is the column in the above file the message refers to.
- * @param fatal shoudl be set to true if the error is non-recoverable.
*/
- LoggableException(std::string msg, std::string file, bool fatal,
- int line = -1, int column = -1)
- : OusiaException(formatMessage(msg, file, fatal, line, column)),
+ LoggableException(std::string msg, std::string file, int line = -1,
+ int column = -1)
+ : OusiaException(formatMessage(msg, file, line, column)),
msg(std::move(msg)),
file(std::move(file)),
- fatal(fatal),
line(line),
column(column)
{
@@ -135,49 +127,30 @@ public:
* Constructor of the LoggableException class with empty file.
*
* @param msg contains the error message.
- * @param fatal should be set to true if the error is non-recoverable.
* @param line is the line in the above file the message refers to.
* @param column is the column in the above file the message refers to.
*/
- LoggableException(std::string msg, bool fatal, int line = -1, int column = -1)
- : OusiaException(formatMessage(msg, "", fatal, line, column)),
+ LoggableException(std::string msg, int line = -1, int column = -1)
+ : OusiaException(formatMessage(msg, "", line, column)),
msg(std::move(msg)),
- fatal(fatal),
line(line),
column(column)
{
}
/**
- * Constructor of the LoggableException class with empty file.
- *
- * @param msg contains the error message.
- * @param fatal should be set to true if the error is non-recoverable.
- */
- LoggableException(std::string msg, bool fatal)
- : OusiaException(formatMessage(msg, "", fatal, -1, -1)),
- msg(std::move(msg)),
- fatal(fatal),
- line(-1),
- column(-1)
- {
- }
-
- /**
* Constructor of the LoggableException class with empty file and an
* position object.
*
* @param msg is the actual log message.
* @param pos is a const reference to a variable which provides position
* information.
- * @param fatal should be set to true if the error is non-recoverable.
*/
template <class PosType>
- LoggableException(std::string msg, bool fatal, const PosType &pos)
+ LoggableException(std::string msg, const PosType &pos)
: OusiaException(
- formatMessage(msg, "", fatal, pos.getLine(), pos.getColumn())),
+ formatMessage(msg, "", pos.getLine(), pos.getColumn())),
msg(std::move(msg)),
- fatal(fatal),
line(pos.getLine()),
column(pos.getColumn())
{