Package com.isode.x400.highlevel
Class X400APIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.isode.x400.highlevel.X400APIException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadDNException,FileException,NotBoundException
Base class representing exception conditions that can be
thrown by the Java X.400 API classes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionX400APIException(String message) Constructs a new X400APIException with the specified message.X400APIException(String message, int nativeErrorCode) Constructs a new X400APIException with the specified message and error code -
Method Summary
Modifier and TypeMethodDescriptionOverride the existing getLocalizedMessage by appending the native error in brackets, if availableintDetermine the native error code (if any) associated with this exception.Return the name of a native error code in String format, for example for 11 (X400_E_BADCREDENTIALS), it returns "Invalid credentials for connection"static StringnativeErrorToString(int ds_status_code) Deprecated.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
X400APIException
Constructs a new X400APIException with the specified message and error code- Parameters:
message- gives extra detail about the specific exception.nativeErrorCode- a value as returned from underlying native code which may be useful in determining the cause of the problem.
-
X400APIException
Constructs a new X400APIException with the specified message.- Parameters:
message- gives extra detail about the specific exception.
-
-
Method Details
-
getNativeErrorCode
public int getNativeErrorCode()Determine the native error code (if any) associated with this exception.- Returns:
- the native error code, which will be zero if no code is associated with this exception.
-
getNativeErrorString
Return the name of a native error code in String format, for example for 11 (X400_E_BADCREDENTIALS), it returns "Invalid credentials for connection"- Returns:
- a String with an explanation of the error code
-
nativeErrorToString
Deprecated.callers should use#nativeErrorToString(),Translate native DS_Status error code value into a String, for example "DS_E_BADDN".The native layer will typically not throw "DSAPIException" objects, but an exception appropriate to the error type, e.g. BadDNException. Therefore, the Strings returned by this method are primarily of interest for debugging purposes, rather than intended for displaying to a user of an application.
- Parameters:
ds_status_code- a DSAPI error code, which should be one of the DS_Status constants- Returns:
- a String containing the symbolic name of the error code. In the case of an unknown error, a String of the form "unknown DS_Status (x)" will be returned.
-
getLocalizedMessage
Override the existing getLocalizedMessage by appending the native error in brackets, if available- Overrides:
getLocalizedMessagein classThrowable
-
#nativeErrorToString(),