Package com.avsystem.anjay
Class AnjayException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.avsystem.anjay.AnjayException
-
- All Implemented Interfaces:
java.io.Serializable
public class AnjayException extends java.lang.RuntimeExceptionAn exception that encapsulates any error condition reported by the underlying native Anjay library.It may also be thrown from certain callback interfaces to pass an error condition into the native library.
The static fields of this class may be used as
errorCode()to represent a certain CoAP-level error code.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intBAD_OPTIONstatic intBAD_REQUESTstatic intINTERNALstatic intMETHOD_NOT_ALLOWEDstatic intNOT_ACCEPTABLEstatic intNOT_FOUNDstatic intNOT_IMPLEMENTEDstatic intREQUEST_ENTITY_INCOMPLETEstatic intSERVICE_UNAVAILABLEstatic intUNAUTHORIZED
-
Constructor Summary
Constructors Constructor Description AnjayException(int errorCode, java.lang.String message)Construct newAnjayException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description interrorCode()Retrieves the error code corresponding to a return value of a C function.
-
-
-
Field Detail
-
BAD_REQUEST
public static final int BAD_REQUEST
-
UNAUTHORIZED
public static final int UNAUTHORIZED
-
BAD_OPTION
public static final int BAD_OPTION
-
NOT_FOUND
public static final int NOT_FOUND
-
METHOD_NOT_ALLOWED
public static final int METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
public static final int NOT_ACCEPTABLE
-
REQUEST_ENTITY_INCOMPLETE
public static final int REQUEST_ENTITY_INCOMPLETE
-
INTERNAL
public static final int INTERNAL
-
NOT_IMPLEMENTED
public static final int NOT_IMPLEMENTED
-
SERVICE_UNAVAILABLE
public static final int SERVICE_UNAVAILABLE
-
-
Constructor Detail
-
AnjayException
public AnjayException(int errorCode, java.lang.String message)Construct newAnjayException.- Parameters:
errorCode- Error code that comes from or into native code, corresponding to a return value from a C function.message- The detail message. It is saved for later retrieval by thegetMessage()method.
-
-