From 44e67d9e2768e1de36698c1be0452b835cbfb1e0 Mon Sep 17 00:00:00 2001 From: jantuomi Date: Mon, 1 Aug 2016 15:52:53 +0300 Subject: Implement 'as_bool' builtin --- src/main/com/jantuomi/tunkki/exception/TunkkiError.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/com/jantuomi/tunkki/exception/TunkkiError.java') diff --git a/src/main/com/jantuomi/tunkki/exception/TunkkiError.java b/src/main/com/jantuomi/tunkki/exception/TunkkiError.java index dd48077..2f133e6 100644 --- a/src/main/com/jantuomi/tunkki/exception/TunkkiError.java +++ b/src/main/com/jantuomi/tunkki/exception/TunkkiError.java @@ -20,7 +20,7 @@ public class TunkkiError extends Exception { UndeclaredSymbolError, IncludeError, GeneralError, - NadaError + CastError, NadaError } private static Map errorTexts = new HashMap<>(); @@ -35,6 +35,7 @@ public class TunkkiError extends Exception { errorTexts.put(ExceptionType.IncludeError, "File %s could not be included."); errorTexts.put(ExceptionType.GeneralError, "%s"); errorTexts.put(ExceptionType.NadaError, "Can't do operation with a nada value."); + errorTexts.put(ExceptionType.CastError, "Illegal cast to type %s from value %s."); } private ExceptionType exceptionType; -- cgit v1.3