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
ErrorCodethat may explain the cause of the exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttivioException()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 booleanequals(java.lang.Object other)static java.lang.StringformatLogMessage(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.ErrorCodegetErrorCode()Get theErrorCodefor this exception.java.lang.StringgetErrorContext()Get the context for this error.java.lang.StringgetMessage()java.lang.StringgetOriginalMessage()Get the original message without ErrorCode.inthashCode()AttivioExceptiontoRemoteException()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 theErrorCodefor this exception.- Specified by:
getErrorCodein interfaceAttivioThrowable
-
getErrorContext
public java.lang.String getErrorContext()
Get the context for this error.This context is specific to the
error codeand will typically consist of things such as field names, document ids, etc.- Specified by:
getErrorContextin interfaceAttivioThrowable
-
getOriginalMessage
public java.lang.String getOriginalMessage()
Get the original message without ErrorCode.- Specified by:
getOriginalMessagein interfaceAttivioThrowable
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein 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:
toRemoteExceptionin interfaceAttivioThrowable
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin 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.
-
-