1 21 22 package org.apache.derby.shared.common.sanity; 23 24 import java.io.*; 25 26 35 public class AssertFailure extends RuntimeException 36 { 37 private Throwable nestedException; 38 39 52 public AssertFailure(String message, Throwable nestedError) 53 { 54 super(message); 55 nestedException = nestedError; 56 } 57 58 61 public AssertFailure(String message) 62 { 63 super(message); 64 } 65 66 public void printStackTrace() { 67 super.printStackTrace(); 68 if (nestedException != null) 69 nestedException.printStackTrace(); 70 } 71 public void printStackTrace(PrintStream s) { 72 super.printStackTrace(s); 73 if (nestedException != null) 74 nestedException.printStackTrace(s); 75 } 76 public void printStackTrace(PrintWriter s) { 77 super.printStackTrace(s); 78 if (nestedException != null) 79 nestedException.printStackTrace(s); 80 } 81 } 82 | Popular Tags |