1 19 20 23 24 package org.netbeans.modules.schema2beans; 25 26 import java.io.Serializable ; 27 import java.util.*; 28 import java.io.*; 29 30 public class Schema2BeansException extends Exception implements Serializable { 31 protected String originalStackTrace; 32 33 public Schema2BeansException(String msg) { 34 super(msg); 35 } 36 37 public String getOriginalStackTrace() { 38 if (originalStackTrace == null) 40 return getMessage(); 41 return getMessage()+"\n"+originalStackTrace; 42 } 43 44 public void stashOriginalStackTrace() { 45 StringWriter strWriter = new StringWriter(); 46 printStackTrace(new PrintWriter(strWriter)); 47 originalStackTrace = strWriter.toString(); 48 } 50 } 51 | Popular Tags |