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 anullpayload).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringNO_CODE(empty) status code used if none is givenstatic StringNO_MESSAGEstatus 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 StringgetMessage()StringgetStatusCode()static StringgetStatusCode(Throwable t)Gets a status code from the given Throwable.StringgetStatusMessage()static StringgetStatusMessage(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:
getMessagein 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-
nullstatus 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-
nullstatus message
-
-