1 18 19 package org.osgi.service.application; 20 21 41 public class ApplicationException extends Exception { 42 private static final long serialVersionUID = -7173190453622508207L; 43 private final Throwable cause; 44 private final int errorCode; 45 46 49 public static final int APPLICATION_LOCKED = 0x01; 50 51 56 public static final int APPLICATION_NOT_LAUNCHABLE = 0x02; 57 58 62 public static final int APPLICATION_INTERNAL_ERROR = 0x03; 63 64 68 public static final int APPLICATION_SCHEDULING_FAILED = 0x04; 69 70 74 public static final int APPLICATION_DUPLICATE_SCHEDULE_ID = 0x05; 75 76 80 public ApplicationException(int errorCode) { 81 this(errorCode,(Throwable ) null); 82 } 83 84 90 public ApplicationException(int errorCode, Throwable cause) { 91 super(); 92 this.cause = cause; 93 this.errorCode = errorCode; 94 } 95 96 101 public ApplicationException(int errorCode, String message) { 102 this(errorCode, message,null); 103 } 104 105 112 public ApplicationException(int errorCode, String message, Throwable cause) { 113 super(message); 114 this.cause = cause; 115 this.errorCode = errorCode; 116 } 117 118 125 public Throwable getCause() { 126 return cause; 127 } 128 129 133 public int getErrorCode() { 134 return errorCode; 135 } 136 } 137 | Popular Tags |