ORCentral

src/eu/coform/ORException.java

Go to the documentation of this file.
00001 package eu.coform;
00002 
00013 public class ORException extends Exception
00014 {
00015    private static final long serialVersionUID = -6066635047854829570L;
00016    
00017    
00021    public int    errorcode;
00022    
00027    public String errormessage;
00028    
00035    public ORException(Error error) {
00036       super(Integer.toString(error.code()));
00037       this.errorcode = error.code();
00038       this.errormessage = error.description();
00039    }
00040    
00049    public ORException(int error) {
00050       super(Error.errorMap.get(error));
00051       this.errorcode = error;
00052       this.errormessage = Error.errorMap.get(error);
00053    }
00054 
00055    @Deprecated
00056    public ORException()
00057    {
00058       this.errorcode    = 0;
00059       this.errormessage = "No error";
00060    }
00061    
00062    @Deprecated 
00063    public ORException(int errorcode, String errormessage)
00064    {
00065      super(errormessage);  
00066      this.errorcode    = errorcode;
00067      this.errormessage = errormessage;
00068    }
00069    
00070 }
00071 
 All Classes Namespaces Files Functions Variables Enumerations