@ExperimentalApi public class ServiceException extends RuntimeException
Every ServiceException subclass should have a clean mapping to HTTP response statuses and messages.
Services may throw this exception to wrap general unexpected exceptions; instances of this base class (rather than a subclass) map to a http 500 error.
 ServiceExceptions can handle the case where multiple validation errors occur - use the
 constructor accepting ValidationResult, and they will all be returned to the client.
| Constructor and Description | 
|---|
ServiceException()  | 
ServiceException(String message)  | 
ServiceException(String message,
                Throwable cause)  | 
ServiceException(String message,
                ValidationResult validationResult)  | 
ServiceException(Throwable throwable)  | 
| Modifier and Type | Method and Description | 
|---|---|
com.atlassian.fugue.Option<ValidationResult> | 
getOptionalValidationResult()  | 
String | 
toString()  | 
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic ServiceException()
public ServiceException(String message)
public ServiceException(Throwable throwable)
public ServiceException(String message, ValidationResult validationResult)
public com.atlassian.fugue.Option<ValidationResult> getOptionalValidationResult()
Copyright © 2003–2018 Atlassian. All rights reserved.