summaryrefslogtreecommitdiffstats
path: root/engine/flatexception.cpp
diff options
context:
space:
mode:
authorancarola <raffaele.ancarola@epfl.ch>2019-01-19 20:31:46 +0100
committerancarola <raffaele.ancarola@epfl.ch>2019-01-19 20:31:46 +0100
commitba86c8245484279ed7e78912b1ecd9ff4ac82e1e (patch)
tree7f3a04a92b862c4d145f2e79b87d524f98b54eed /engine/flatexception.cpp
parentTest two completed successfully (diff)
downloadflatland-ba86c8245484279ed7e78912b1ecd9ff4ac82e1e.tar.gz
flatland-ba86c8245484279ed7e78912b1ecd9ff4ac82e1e.zip
minor fixes
Diffstat (limited to 'engine/flatexception.cpp')
-rw-r--r--engine/flatexception.cpp16
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];
+}
+