1 cananian 1.1.2.1 // InterpretedThrowable.java, created Mon Dec 28 01:27:53 1998 by cananian 2 cananian 1.1.2.3 // Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu> 3 cananian 1.1.2.3 // Licensed under the terms of the GNU GPL; see COPYING for details. 4 cananian 1.1.2.1 package harpoon.Interpret.Quads; 5 cananian 1.1.2.1 6 cananian 1.1.2.2 import harpoon.ClassFile.HClass; 7 cananian 1.1.2.1 import harpoon.IR.Quads.Quad; 8 cananian 1.1.2.2 import harpoon.Util.Util; 9 cananian 1.1.2.1 /** 10 cananian 1.1.2.1 * <code>InterpretedThrowable</code> is a wrapper for an exception within 11 cananian 1.1.2.1 * the interpreter. 12 cananian 1.1.2.1 * 13 cananian 1.1.2.1 * @author C. Scott Ananian <cananian@alumni.princeton.edu> 14 cananian 1.4 * @version $Id: InterpretedThrowable.java,v 1.4 2002/04/10 03:05:50 cananian Exp $ 15 cananian 1.1.2.1 */ 16 cananian 1.1.2.1 final class InterpretedThrowable extends RuntimeException { 17 cananian 1.1.2.1 final ObjectRef ex; 18 cananian 1.1.2.1 final String[] stackTrace; 19 cananian 1.1.2.1 /** Creates a <code>InterpretedThrowable</code>. */ 20 cananian 1.1.2.1 InterpretedThrowable(ObjectRef ex, String[] st) { 21 cananian 1.1.2.1 this.ex = ex; this.stackTrace = st; 22 cananian 1.3.2.1 assert ex.type.isInstanceOf(ex.ss.HCthrowable); 23 cananian 1.1.2.1 } 24 cananian 1.1.2.1 InterpretedThrowable(ObjectRef ex, StaticState ss) { 25 cananian 1.1.2.1 this.ex = ex; this.stackTrace = ss.stackTrace(); 26 cananian 1.3.2.1 assert ex.type.isInstanceOf(ss.HCthrowable); 27 cananian 1.1.2.1 } 28 cananian 1.2 }