package com.philmcrew.utility; /** * Created by IntelliJ IDEA. * User: Mitchell * Date: Feb 24, 2005 * Time: 11:30:19 AM * To change this template use Options | File Templates. */ public class MjfUtilException extends Exception { /** * */ public MjfUtilException() { super(); } /** * * @param message */ public MjfUtilException(String message) { super(message); } /** * * @param message * @param originalException */ public MjfUtilException(String message, Throwable originalException) { super(message, originalException); } /** * * @return Original Exception * * @deprecated */ public Exception getOriginalException() { return (Exception)getCause(); } /** * * @param methodName * @return error string */ public String log(String methodName) { StringBuffer buf = new StringBuffer(100); buf.append("Caught Nu Exception - "); buf.append(this); buf.append(" - in "); buf.append(methodName); if (null != getCause()) { buf.append(" - "); buf.append(" Original Exception: "); buf.append(getCause().getClass().getName()); buf.append(" - "); buf.append(getCause()); } System.err.println(buf); return buf.toString(); } }