1 23 package com.sun.enterprise.repository; 24 25 30 public class J2EEResourceException extends Exception { 31 32 private Exception exception_; 33 private String errorMsg_; 34 35 public J2EEResourceException(String errorMsg) { 36 errorMsg_ = errorMsg; 37 } 38 39 public J2EEResourceException(Exception exception) { 40 exception_ = exception; 41 } 42 43 public Exception getNestedException() { 44 return exception_; 45 } 46 47 public String toString() { 48 if (exception_ == null) { 49 return errorMsg_ + " : " + super.toString(); 50 } else { 51 return super.toString() + "\n" + exception_.toString(); 52 } 53 } 54 } 55 | Popular Tags |