aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/com/jantuomi/tunkki/exception
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/com/jantuomi/tunkki/exception')
-rw-r--r--src/main/com/jantuomi/tunkki/exception/types/NotAPrototypeTunkkiError.java20
-rw-r--r--src/main/com/jantuomi/tunkki/exception/types/TunkkiError.java3
2 files changed, 22 insertions, 1 deletions
diff --git a/src/main/com/jantuomi/tunkki/exception/types/NotAPrototypeTunkkiError.java b/src/main/com/jantuomi/tunkki/exception/types/NotAPrototypeTunkkiError.java
new file mode 100644
index 0000000..db351bb
--- /dev/null
+++ b/src/main/com/jantuomi/tunkki/exception/types/NotAPrototypeTunkkiError.java
@@ -0,0 +1,20 @@
+package com.jantuomi.tunkki.exception.types;
+
+/**
+ * Created by jan on 29.8.2016.
+ */
+public class NotAPrototypeTunkkiError extends TunkkiError {
+ public NotAPrototypeTunkkiError(int line, String... args) {
+ super(line, args);
+ }
+
+ @Override
+ public String what() {
+ return "Symbol %s is not an object prototype.";
+ }
+
+ @Override
+ ExceptionType getType() {
+ return ExceptionType.NotAPrototypeError;
+ }
+}
diff --git a/src/main/com/jantuomi/tunkki/exception/types/TunkkiError.java b/src/main/com/jantuomi/tunkki/exception/types/TunkkiError.java
index dfef1cf..3bc4186 100644
--- a/src/main/com/jantuomi/tunkki/exception/types/TunkkiError.java
+++ b/src/main/com/jantuomi/tunkki/exception/types/TunkkiError.java
@@ -27,7 +27,8 @@ abstract public class TunkkiError extends Exception {
FileNotFoundError,
NotAnObjectError,
MissingTerminatorTokenError,
- NadaError
+ NadaError,
+ NotAPrototypeError
}
private int line;