View Javadoc

1   /*
2    * $Id: ApplicationException.java,v 1.1 2007/10/12 12:42:10 oeuillot Exp $
3    */
4   package org.rcfaces.core.lang;
5   
6   /**
7    * 
8    * @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
9    * @version $Revision: 1.1 $ $Date: 2007/10/12 12:42:10 $
10   */
11  public class ApplicationException extends RuntimeException {
12  
13      private static final String REVISION = "$Revision: 1.1 $";
14  
15      private static final long serialVersionUID = -1121873372303775679L;
16  
17      private final int errorCode;
18  
19      private final String errorMessage;
20  
21      public ApplicationException(String message, Throwable cause, int errorCode,
22              String errorMessage) {
23          super(message, cause);
24  
25          this.errorCode = errorCode;
26          this.errorMessage = errorMessage;
27      }
28  
29      public ApplicationException(int errorCode, String errorMessage) {
30          this.errorCode = errorCode;
31          this.errorMessage = errorMessage;
32      }
33  
34      public final int getErrorCode() {
35          return errorCode;
36      }
37  
38      public final String getErrorMessage() {
39          return errorMessage;
40      }
41  
42  }