/**
*
* For example, exceptions that signal that a pdf file is corrupt should be * represented as presentable exceptions so that the user interface frontends * can present according texts. *
* * @author wprinz */ public class PresentableException extends Exception { /** * SVUID. */ private static final long serialVersionUID = -102406558526000792L; protected int errorCode = -1; /** * @param message */ public PresentableException(int errorCode, String message) { super(message); this.errorCode = errorCode; } /** * @param message * @param cause */ public PresentableException(int errorCode, String message, Throwable cause) { super(message, cause); this.errorCode = errorCode; } /** * @param cause */ public PresentableException(int errorCode, Throwable cause) { super(cause); this.errorCode = errorCode; } /** * Returns the error code of this exception. * @return Returns the error code of this exception. */ public int getErrorCode () { return this.errorCode; } }