diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-19 20:31:46 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-19 20:31:46 +0100 |
commit | ba86c8245484279ed7e78912b1ecd9ff4ac82e1e (patch) | |
tree | 7f3a04a92b862c4d145f2e79b87d524f98b54eed /engine/flatexception.cpp | |
parent | Test two completed successfully (diff) | |
download | flatland-ba86c8245484279ed7e78912b1ecd9ff4ac82e1e.tar.gz flatland-ba86c8245484279ed7e78912b1ecd9ff4ac82e1e.zip |
minor fixes
Diffstat (limited to 'engine/flatexception.cpp')
-rw-r--r-- | engine/flatexception.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engine/flatexception.cpp b/engine/flatexception.cpp new file mode 100644 index 0000000..0216dd5 --- /dev/null +++ b/engine/flatexception.cpp @@ -0,0 +1,16 @@ +#include "flatexception.h" +#include <stdio.h> + +FlatException::FlatException(const char* error) : error(error) {} + +FlatException::~FlatException() {} + +char buffer[256]; + +const char* FlatException::what() const throw() +{ + sprintf(buffer, "%s thrown: %s", specific(), error); + + return &buffer[0]; +} + |