Package com.attivio.sdk
Class AttivioException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.attivio.sdk.AttivioException
-
- All Implemented Interfaces:
AttivioThrowable
,java.io.Serializable
- Direct Known Subclasses:
TransportException
@WebFault public class AttivioException extends java.lang.Exception implements AttivioThrowable
The base class for general Attivio generated exceptions.Contains the underlying
ErrorCode
that may explain the cause of the exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AttivioException()
AttivioException(ErrorCode code, java.lang.String message, java.lang.Object... params)
Constructs an AttivioException with the error code.AttivioException(ErrorCode code, java.lang.Throwable cause, java.lang.String message, java.lang.Object... params)
Constructs an AttivioException with the error code.AttivioException(java.lang.String context, ErrorCode code, java.lang.Throwable cause, java.lang.String message, java.lang.Object... params)
Constructs an AttivioException with the error code.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
static java.lang.String
formatLogMessage(java.lang.String msg, java.lang.Object... params)
Safely formats a log message handling null input as well as returning a warning message if message formatting failed.ErrorCode
getErrorCode()
Get theErrorCode
for this exception.java.lang.String
getErrorContext()
Get the context for this error.java.lang.String
getMessage()
java.lang.String
getOriginalMessage()
Get the original message without ErrorCode.int
hashCode()
AttivioException
toRemoteException()
Convert this exception to be a remote exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.attivio.sdk.AttivioThrowable
getCause, getStackTrace
-
-
-
-
Constructor Detail
-
AttivioException
protected AttivioException()
-
AttivioException
public AttivioException(ErrorCode code, java.lang.String message, java.lang.Object... params)
Constructs an AttivioException with the error code. Note: parameters are used as an argument to a String format on the message argument.- Parameters:
code
- the error codemessage
- the error messageparams
- any error message parameters
-
AttivioException
public AttivioException(ErrorCode code, java.lang.Throwable cause, java.lang.String message, java.lang.Object... params)
Constructs an AttivioException with the error code. Note: parameters are used as an argument to a String format on the message argument.- Parameters:
code
- the error codecause
- the error causemessage
- the error messageparams
- any error message parameters
-
AttivioException
public AttivioException(java.lang.String context, ErrorCode code, java.lang.Throwable cause, java.lang.String message, java.lang.Object... params)
Constructs an AttivioException with the error code. Note: parameters are used as an argument to a String format on the message argument.- Parameters:
code
- the error codecontext
- the context for this error (field name, docid, etc)cause
- the error causemessage
- the error messageparams
- any error message parameters
-
-
Method Detail
-
getErrorCode
public ErrorCode getErrorCode()
Get theErrorCode
for this exception.- Specified by:
getErrorCode
in interfaceAttivioThrowable
-
getErrorContext
public java.lang.String getErrorContext()
Get the context for this error.This context is specific to the
error code
and will typically consist of things such as field names, document ids, etc.- Specified by:
getErrorContext
in interfaceAttivioThrowable
-
getOriginalMessage
public java.lang.String getOriginalMessage()
Get the original message without ErrorCode.- Specified by:
getOriginalMessage
in interfaceAttivioThrowable
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
toRemoteException
public AttivioException toRemoteException()
Convert this exception to be a remote exception.This converts this exception to a representation that a client can receive.
- Specified by:
toRemoteException
in interfaceAttivioThrowable
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
formatLogMessage
public static final java.lang.String formatLogMessage(java.lang.String msg, java.lang.Object... params)
Safely formats a log message handling null input as well as returning a warning message if message formatting failed.
-
-