Class ServiceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.atlassian.confluence.api.service.exceptions.ServiceException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadRequestException, ConflictException, GoneException, IllegalURLException, InternalServerException, LicenseUnavailableException, NotAuthenticatedException, NotFoundException, NotImplementedServiceException, PermissionException, ReadOnlyException, SeeOtherException

public class ServiceException extends RuntimeException
All thrown API Service-level exceptions should extend this exception.

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.

See Also:
  • Constructor Details

    • ServiceException

      public ServiceException()
    • ServiceException

      public ServiceException(String message)
    • ServiceException

      public ServiceException(Throwable throwable)
    • ServiceException

      public ServiceException(String message, Throwable cause)
    • ServiceException

      public ServiceException(String message, ValidationResult validationResult)
  • Method Details