public class EcmsExceptionFactory extends Object
Constructor and Description |
---|
EcmsExceptionFactory() |
Modifier and Type | Method and Description |
---|---|
Exception |
createException(ErrorType error,
Throwable cause)
Creates a new exception for the given service fault.
|
boolean |
validate(ErrorCodeType errorCode)
Checks that the error code is supported by exactly one registered exception factory.
|
public Exception createException(ErrorType error, Throwable cause)
null
.error
- the service errorcause
- the exception causepublic boolean validate(ErrorCodeType errorCode) throws InconsistentExceptionFactoryRegistryException
true
. If the code is not supported by any registered factory
the method returns false
. If the code is supported by more than one registered factory an exception
is raised.errorCode
- the error code to validatetrue
if exactly one registered factory supports this error code, otherwise false.Exception
- raised if multiple factories support the given error codeInconsistentExceptionFactoryRegistryException
Copyright © 2016 Lexmark Enterprise Software Deutschland GmbH. All rights reserved.