diff src/nabble/naml/compiler/TemplateRuntimeException.java @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/nabble/naml/compiler/TemplateRuntimeException.java	Thu Mar 21 19:15:52 2019 -0600
@@ -0,0 +1,23 @@
+package nabble.naml.compiler;
+
+
+public class TemplateRuntimeException extends RuntimeException {
+
+	public TemplateRuntimeException(Exception cause) {
+		super(hideNull(cause.getMessage())+StackTrace.current(),cause);
+	}
+
+	public TemplateRuntimeException(String msg,Exception cause) {
+		super(hideNull(msg)+StackTrace.current(),cause);
+	}
+
+	public TemplateRuntimeException(String msg) {
+		super(hideNull(msg)+StackTrace.current());
+	}
+
+	protected TemplateRuntimeException() {}
+
+	private static String hideNull(String s) {
+		return s==null ? "" : s;
+	}
+}