1 package gov.nasa.jpf; 20 21 import java.io.PrintStream ; 22 import java.io.PrintWriter ; 23 24 25 28 public class JPFException extends RuntimeException { 29 Throwable throwable; 30 31 public JPFException (String s) { 32 super(s); 33 throwable = null; 34 } 35 36 public JPFException (Throwable s) { 37 super(s.getClass() + ": " + s.getMessage()); 38 throwable = s; 39 } 40 41 public void printStackTrace () { 42 if (throwable != null) { 43 throwable.printStackTrace(); 44 } 45 46 super.printStackTrace(); 47 } 48 49 public void printStackTrace (PrintStream out) { 50 if (throwable != null) { 51 throwable.printStackTrace(out); 52 } 53 54 super.printStackTrace(out); 55 } 56 57 public void printStackTrace (PrintWriter out) { 58 if (throwable != null) { 59 throwable.printStackTrace(out); 60 } 61 62 super.printStackTrace(out); 63 } 64 } | Popular Tags |