Class ExceptionAdvice
- java.lang.Object
-
- de.digitalcollections.iiif.hymir.frontend.ExceptionAdvice
-
@ControllerAdvice public class ExceptionAdvice extends Object
-
-
Constructor Summary
Constructors Constructor Description ExceptionAdvice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleAllOther(Exception exception)voidhandleInvalidParametersException(Exception exception)voidhandleResolvingException(Exception exception)voidhandleResourceNotFoundException(Exception exception)protected ApiErrorhandleScalingException(ScalingException exception)Sometimes scaling an image can lead to broken dimensions (usually because of rounding to 0).voidhandleUnsupportedFormatException(Exception exception)voidhandleUnsupportedOperationException(Exception exception)
-
-
-
Method Detail
-
handleInvalidParametersException
@ResponseStatus(BAD_REQUEST) @ExceptionHandler(InvalidParametersException.class) public void handleInvalidParametersException(Exception exception)
-
handleResolvingException
@ResponseStatus(NOT_FOUND) @ExceptionHandler(ResolvingException.class) public void handleResolvingException(Exception exception)
-
handleResourceNotFoundException
@ResponseStatus(NOT_FOUND) @ExceptionHandler(de.digitalcollections.model.exception.ResourceNotFoundException.class) public void handleResourceNotFoundException(Exception exception)
-
handleScalingException
@ExceptionHandler(ScalingException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody protected ApiError handleScalingException(ScalingException exception)
Sometimes scaling an image can lead to broken dimensions (usually because of rounding to 0).- Parameters:
exception- The exception to handle- Returns:
- An error description for the client
-
handleUnsupportedFormatException
@ResponseStatus(UNSUPPORTED_MEDIA_TYPE) @ExceptionHandler(UnsupportedFormatException.class) public void handleUnsupportedFormatException(Exception exception)
-
handleUnsupportedOperationException
@ResponseStatus(BAD_REQUEST) @ExceptionHandler(java.lang.UnsupportedOperationException.class) public void handleUnsupportedOperationException(Exception exception)
-
handleAllOther
@ResponseStatus(INTERNAL_SERVER_ERROR) @ExceptionHandler(java.lang.Exception.class) public void handleAllOther(Exception exception)
-
-