view 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 source

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;
	}
}