Package com.boomi.connector.api
Class ConnectorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.boomi.connector.api.ConnectorException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ContainerStoppingException
public class ConnectorException extends RuntimeException
Throwing a ConnectorException is a shortcut for indicating an OperationResponse for all outstanding inputs to an operation. Throwing this exception is the equivalent of calling OperationResponse.addCombinedResult for all outstanding inputs with the statusCode and statusMessage included in the exception (and anull
payload).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
NO_CODE
(empty) status code used if none is givenstatic String
NO_MESSAGE
status message used if none is given
-
Constructor Summary
Constructors Constructor Description ConnectorException(String statusMessage)
ConnectorException(String statusCode, String statusMessage)
ConnectorException(String statusCode, String statusMessage, Throwable cause)
ConnectorException(String statusMessage, Throwable cause)
ConnectorException(Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
String
getStatusCode()
static String
getStatusCode(Throwable t)
Gets a status code from the given Throwable.String
getStatusMessage()
static String
getStatusMessage(Throwable t)
Gets a status message from the given Throwable.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
NO_CODE
public static final String NO_CODE
(empty) status code used if none is given- See Also:
- Constant Field Values
-
NO_MESSAGE
public static final String NO_MESSAGE
status message used if none is given- See Also:
- Constant Field Values
-
-
Method Detail
-
getStatusCode
public String getStatusCode()
-
getStatusMessage
public String getStatusMessage()
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getStatusCode
public static String getStatusCode(Throwable t)
Gets a status code from the given Throwable. If the given Throwable is a ConnectorException, the referenced status codde is returned, otherwiseNO_CODE
.- Parameters:
t
- Throwable to inspect, may benull
- Returns:
- a non-
null
status code
-
getStatusMessage
public static String getStatusMessage(Throwable t)
Gets a status message from the given Throwable. If the given Throwable is a ConnectorException, the referenced status message is returned, otherwise the Throwable is converted to a meaningful error message.- Parameters:
t
- Throwable to inspect, may benull
- Returns:
- a non-
null
status message
-
-