1 56 package org.objectstyle.cayenne; 57 58 68 public class CayenneRuntimeException extends RuntimeException { 69 private Throwable _cause; 70 71 74 public CayenneRuntimeException() { 75 } 76 77 81 public CayenneRuntimeException(String msg) { 82 super(msg); 83 } 84 85 89 public CayenneRuntimeException(Throwable th) { 90 this(th == null ? (String ) null : th.toString(), th); 91 } 92 93 public CayenneRuntimeException(String msg, Throwable th) { 94 super(msg); 95 this._cause = th; 96 } 97 98 101 public Throwable getCause() { 102 return _cause; 103 } 104 105 110 public String getUnlabeledMessage() { 111 return super.getMessage(); 112 } 113 114 118 public String getMessage() { 119 String message = super.getMessage(); 120 return (message != null) 121 ? CayenneException.getExceptionLabel() + message 122 : CayenneException.getExceptionLabel() + "(no message)"; 123 } 124 } 125 | Popular Tags |