org.netxms.api.client
Class NetXMSClientException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.netxms.api.client.NetXMSClientException
All Implemented Interfaces:
java.io.Serializable

public abstract class NetXMSClientException
extends java.lang.Exception

Generic NetXMS client exception. Intended to be subclassed by concrete client implementation.

See Also:
Serialized Form

Field Summary
protected  java.lang.String additionalInfo
          Additional information about this error
protected  int errorCode
          Application-specific error code
 
Constructor Summary
NetXMSClientException(int errorCode)
          Create NetXMS client exception with given error code.
NetXMSClientException(int errorCode, java.lang.String additionalInfo)
          Create NetXMS client exception with given error code and additional information.
 
Method Summary
 int getErrorCode()
          Get exception's error code.
protected abstract  java.lang.String getErrorMessage(int code)
          Get error message text for given error code.
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

errorCode

protected int errorCode
Application-specific error code


additionalInfo

protected java.lang.String additionalInfo
Additional information about this error

Constructor Detail

NetXMSClientException

public NetXMSClientException(int errorCode)
Create NetXMS client exception with given error code.

Parameters:
errorCode - error code

NetXMSClientException

public NetXMSClientException(int errorCode,
                             java.lang.String additionalInfo)
Create NetXMS client exception with given error code and additional information.

Parameters:
errorCode - error code
additionalInfo - text with additional error-specific information
Method Detail

getErrorMessage

protected abstract java.lang.String getErrorMessage(int code)
Get error message text for given error code. Must not return null.

Parameters:
code - error code
Returns:
error message for given code

getErrorCode

public int getErrorCode()
Get exception's error code.

Returns:
the errorCode

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable


Copyright © 2011. All Rights Reserved.