view src/luan/LuanRuntimeException.java @ 1963:c4844055caa6

minor - TextAreaLuan
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 06 Jun 2025 13:14:33 -0600
parents 0de03667a950
children
line wrap: on
line source

package luan;

import java.io.PrintWriter;
import java.io.PrintStream;


public final class LuanRuntimeException extends RuntimeException {
	public final LuanException luanException;

	public LuanRuntimeException(LuanException e) {
		super(e);
		luanException = e;
	}

	@Override public void printStackTrace(PrintStream s) {
		LuanException luanException = (LuanException)getCause();
		s.print("Luan: ");
		s.println(luanException.luanStackTrace());
		s.print("Caused by: ");
		super.printStackTrace(s);
	}

	@Override public void printStackTrace(PrintWriter s) {
		LuanException luanException = (LuanException)getCause();
		s.print("Luan: ");
		s.println(luanException.luanStackTrace());
		s.print("Caused by: ");
		super.printStackTrace(s);
	}
}