1 16 package org.apache.pluto.portlet.admin; 17 18 25 public class PlutoAdminException extends RuntimeException { 26 27 private Throwable _cause = null; 28 29 32 private PlutoAdminException() { 33 super(); 34 } 35 36 39 public PlutoAdminException(String message) { 40 super(message); 41 } 42 43 46 public PlutoAdminException(Throwable cause) { 47 super(cause.getMessage()); 48 _cause = cause; 49 } 50 51 55 public PlutoAdminException(String message, Throwable cause) { 56 super(message); 57 _cause = cause; 58 } 59 60 63 public Throwable getCause() { 64 return _cause; 65 } 66 public String toString() { 67 StringBuffer msg = new StringBuffer (); 68 msg.append(getMessage()); 69 if (_cause != null) { 70 msg.append(" Underlying cause: "); 71 msg.append(_cause.getClass().getName()); 72 msg.append(". Underlying cause message: "); 73 msg.append(_cause.getMessage()); 74 } 75 return msg.toString(); 76 } 77 } 78 | Popular Tags |