diff options
Diffstat (limited to 'src/lib/exceptions/exceptions.h')
-rw-r--r-- | src/lib/exceptions/exceptions.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/exceptions/exceptions.h b/src/lib/exceptions/exceptions.h index e9dc3d6d1d..fdea3a0f1b 100644 --- a/src/lib/exceptions/exceptions.h +++ b/src/lib/exceptions/exceptions.h @@ -40,8 +40,7 @@ public: /// @param file the file name where the exception was thrown. /// @param line the line in \a file where the exception was thrown. /// @param what a description (type) of the exception. - Exception(const char* file, size_t line, const char* what) : - file_(file), line_(line), what_(what) {} + Exception(const char* file, size_t line, const char* what); /// \brief Constructor for a given type for exceptions with file name and /// file line number. @@ -49,8 +48,7 @@ public: /// @param file the file name where the exception was thrown. /// @param line the line in \a file where the exception was thrown. /// @param what a description (type) of the exception. - Exception(const char* file, size_t line, const std::string& what) : - file_(file), line_(line), what_(what) {} + Exception(const char* file, size_t line, const std::string& what); /// The destructor virtual ~Exception() throw() {} @@ -106,9 +104,18 @@ public: //@} private: + + /// Specifies the filename where this exception was raised const char* const file_; + + /// Specifies the line number where this exception was raised size_t line_; + + /// Specifies actual content of the exception const std::string what_; + + /// Specifies actual context of the exception (with file:line added) + std::string verbose_what_; }; /// \brief A generic exception that is thrown if a parameter given |