1 56 57 package org.jdom.contrib.beans; 58 59 60 64 65 public class BeanMapperException extends Exception { 66 67 Exception rootCause; 68 69 public BeanMapperException(Exception rootCause) { 70 super(rootCause.toString()); 71 this.rootCause = rootCause; 72 } 73 74 public BeanMapperException(String message, Exception rootCause) { 75 super(message + ": " + rootCause.toString()); 76 this.rootCause = rootCause; 77 } 78 79 public BeanMapperException(String message) { 80 super(message); 81 } 82 83 public Exception getRootCause() { 84 return rootCause; 85 } 86 87 public void printStackTrace() { 88 super.printStackTrace(); 89 if (rootCause != null) { 90 System.err.print("Root cause: " ); 91 rootCause.printStackTrace(); 92 } 93 } 94 } 95 | Popular Tags |