Package org.netxms.client
Class NXCException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.netxms.client.NXCException
- All Implemented Interfaces:
- Serializable
NetXMS client library exception. Used to report API call errors.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected StringAdditional information about this errorprotected intApplication-specific error codeprotected long[]List of identifiers of any related objects (for example, objects referencing entity being deleted).
- 
Constructor SummaryConstructorsConstructorDescriptionNXCException(int errorCode) Create new NXC exception.NXCException(int errorCode, String additionalInfo) Create new NXC exception with additional information.NXCException(int errorCode, String additionalInfo, long[] relatedObjects) Create new NXC exception with additional information.NXCException(int errorCode, String additionalInfo, long[] relatedObjects, Throwable cause) Create new NXC exception with additional information and root cause reference.NXCException(int errorCode, Throwable cause) Create new NXC exception with root cause reference.
- 
Method SummaryModifier and TypeMethodDescriptionGet additional information associated with exception (for example, NXSL error message)intGet exception's error code.protected StringgetErrorMessage(int code, String lang) Get error message text for given error code.long[]Get list of identifiers of related objects.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Field Details- 
errorCodeprotected int errorCodeApplication-specific error code
- 
additionalInfoAdditional information about this error
 
- 
- 
Constructor Details- 
NXCExceptionpublic NXCException(int errorCode) Create new NXC exception.- Parameters:
- errorCode- Error code
 
- 
NXCExceptionCreate new NXC exception with additional information.- Parameters:
- errorCode- Error code
- additionalInfo- Additional info
 
- 
NXCExceptionCreate new NXC exception with additional information.- Parameters:
- errorCode- Error code
- additionalInfo- Additional info
- relatedObjects- List of related object identifiers
 
- 
NXCExceptionCreate new NXC exception with root cause reference.- Parameters:
- errorCode- Error code
- cause- root cause exception
 
- 
NXCExceptionCreate new NXC exception with additional information and root cause reference.- Parameters:
- errorCode- Error code
- additionalInfo- Additional info
- relatedObjects- List of related object identifiers
- cause- root cause exception
 
 
- 
- 
Method Details- 
getErrorMessageGet error message text for given error code. Must not return null.- Parameters:
- code- error code
- lang- language code
- Returns:
- error message for given code
 
- 
getErrorCodepublic int getErrorCode()Get exception's error code.- Returns:
- the errorCode
 
- 
getAdditionalInfoGet additional information associated with exception (for example, NXSL error message)- Returns:
- additional information associated with exception
 
- 
getRelatedObjectspublic long[] getRelatedObjects()Get list of identifiers of related objects.- Returns:
- list of identifiers of related objects or null if not provided
 
- 
getMessage- Overrides:
- getMessagein class- Throwable
- See Also:
 
- 
getLocalizedMessage- Overrides:
- getLocalizedMessagein class- Throwable
- See Also:
 
 
-