Package com.senzing.sdk
Class SzException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.senzing.sdk.SzException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SzBadInputException
,SzReplaceConflictException
Defines the base exception for Senzing errors. This adds a property
for the numeric Senzing error code which can optionally be set.
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor.SzException
(int errorCode, String message) Constructs with a message explaing the reason for the exception.SzException
(int errorCode, String message, Throwable cause) Constructs with the Senzing error code, the message explaing the reason for the exception and theThrowable
that is the underlying cause for the exception.SzException
(String message) Constructs with a message explaing the reason for the exception.SzException
(String message, Throwable cause) Constructs with a message explaing the reason for the exception and theThrowable
that is the underlying cause for the exception.SzException
(Throwable cause) Constructs with theThrowable
that is the underlying cause for the exception. -
Method Summary
Modifier and TypeMethodDescriptionGets the underlying Senzing error code associated with the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SzException
public SzException()Default constructor. -
SzException
Constructs with a message explaing the reason for the exception.- Parameters:
message
- The message explaining the reason for the exception.
-
SzException
Constructs with a message explaing the reason for the exception.- Parameters:
errorCode
- The underlying Senzing error code.message
- The message explaining the reason for the exception.
-
SzException
Constructs with theThrowable
that is the underlying cause for the exception.- Parameters:
cause
- The underlying cause for the exception.
-
SzException
Constructs with a message explaing the reason for the exception and theThrowable
that is the underlying cause for the exception.- Parameters:
message
- The message explaining the reason for the exception.cause
- The underlying cause for the exception.
-
SzException
Constructs with the Senzing error code, the message explaing the reason for the exception and theThrowable
that is the underlying cause for the exception.- Parameters:
errorCode
- The underlying Senzing error code.message
- The message explaining the reason for the exception.cause
- The underlying cause for the exception.
-
-
Method Details
-
getErrorCode
Gets the underlying Senzing error code associated with the exception. This returnsnull
if no error code was associated with the exception.- Returns:
- The underlying Senzing error code associated with the
exception, or
null
if none was associated.
-