1 25 26 package org.objectweb.jonas.jmx; 27 28 32 public class ManagementException extends RuntimeException { 33 34 protected Throwable cause; 35 36 public ManagementException(String message) { 37 this(message, null); 38 } 39 40 public ManagementException(String message, Throwable throwable) { 41 super(message); 42 this.cause = throwable; 43 } 44 45 public Throwable getCause() { 46 return cause; 47 } 48 49 public String getMessage() { 50 String msg = super.getMessage(); 51 if (cause != null) { 52 if (!msg.equals("")) 53 msg += cause.toString(); 54 else 55 msg += ": " + cause.toString(); 56 } 57 return msg ; 58 } 59 60 public String toString(){ 61 return(this.getClass().getName() + " : " + this.getMessage()); 62 } 63 64 } 65 | Popular Tags |