summaryrefslogtreecommitdiff
path: root/error.cpp
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-11-20 11:27:07 +0100
committertomsmeding <tom.smeding@gmail.com>2016-11-20 11:27:07 +0100
commit3b390967e7c2ee4ac6d1a67c77f40ed43005e012 (patch)
tree4be72c3ed32277329c472c1dc72793577ea29195 /error.cpp
Initial
Diffstat (limited to 'error.cpp')
-rw-r--r--error.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/error.cpp b/error.cpp
new file mode 100644
index 0000000..2084319
--- /dev/null
+++ b/error.cpp
@@ -0,0 +1,13 @@
+#include "error.h"
+
+using namespace std;
+
+NameError::NameError(const string &what_arg)
+ :runtime_error("Name '"+what_arg+"' not found"){}
+NameError::NameError(const char *what_arg)
+ :NameError(string(what_arg)){}
+
+TypeError::TypeError(const string &what_arg)
+ :runtime_error(what_arg){}
+TypeError::TypeError(const char *what_arg)
+ :runtime_error(what_arg){}