public abstract class ProviderException extends SystemException
Service Providers must provide subclasses of this exception.
| Constructor and Description |
|---|
ProviderException() |
ProviderException(String message) |
ProviderException(String message,
Throwable cause) |
ProviderException(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
ProviderException |
addErrorCode(String errorCode)
Adds error code to this exception.
|
Set<String> |
getErrorCodes()
Returns error codes attached to this exception.
|
String |
getErrorStatement()
Returns a statement for this error if any.
|
Throwable |
getNativeException()
This method should be overriden by providers relying on external APIs to work with connections.
|
abstract String |
getProviderName()
Overriden by subclasses to provide user friendly provider name.
|
protected ProviderException |
setErrorStatement(String errStmt)
Sets problem statement which caused this exception/
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic ProviderException()
public ProviderException(String message)
public ProviderException(Throwable cause)
public Set<String> getErrorCodes()
Do not use ", . ;" in error codes.
public ProviderException addErrorCode(String errorCode)
errorCode - vendor specific error code.protected ProviderException setErrorStatement(String errStmt)
errStmt - statement text.public Throwable getNativeException()
Examples: SQL Exceptions, LDAP connection exceptions etc.
public String getErrorStatement()
public abstract String getProviderName()
Copyright © 2006-2012. All Rights Reserved.