diff options
Diffstat (limited to 'yage/core/exception.cpp')
-rw-r--r-- | yage/core/exception.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/yage/core/exception.cpp b/yage/core/exception.cpp new file mode 100644 index 00000000..5cf525cc --- /dev/null +++ b/yage/core/exception.cpp @@ -0,0 +1,20 @@ +#include "exception.h" + +namespace yage +{ + +FileLoadException::FileLoadException(std::string err) : std::runtime_error("File Load Exception") +{ + std::ostringstream msg(""); + + msg << runtime_error::what() << ": " << err; + + err_msg = msg.str(); +} + +const char *FileLoadException::what() const throw() +{ + return err_msg.c_str(); +} + +} // namespace yage |