1 33 34 package edu.rice.cs.util; 35 36 46 public class UnexpectedException extends RuntimeException { 47 48 private Throwable _value; 49 50 51 public UnexpectedException(Throwable value) { 52 super(value.toString()); 53 _value = value; 54 } 55 56 57 public UnexpectedException(Throwable value, String msg) { 58 super(msg + ": " + value.toString()); 59 _value = value; 60 } 61 62 63 public UnexpectedException() { 64 this(new RuntimeException ("Unreachable point in code has been reached!")); 65 } 66 67 68 public UnexpectedException(String msg) { 69 this(new RuntimeException (msg)); 70 } 71 72 73 public Throwable getCause() { return _value; } 74 } 75 | Popular Tags |