Package thredds.server
Class TdsErrorHandling
java.lang.Object
thredds.server.TdsErrorHandling
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerExceptionResolver
@Configuration
@ControllerAdvice
public class TdsErrorHandling
extends Object
implements org.springframework.web.servlet.HandlerExceptionResolver
Global Exception handling
ServiceNotAllowed FORBIDDEN
FileNotFoundException NOT_FOUND
IOException INTERNAL_SERVER_ERROR
UnsupportedOperationException UNPROCESSABLE_ENTITY
IllegalArgumentException BAD_REQUEST
BindException BAD_REQUEST
Throwable INTERNAL_SERVER_ERROR
- Since:
- 4/15/2015
- See Also:
-
- "https://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>handle(IOException ex) org.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>handle(org.springframework.validation.BindException ex) org.springframework.http.ResponseEntity<String>handle(org.springframework.web.bind.ServletRequestBindingException ex) org.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>org.springframework.http.ResponseEntity<String>handle(NcssException ex) org.springframework.web.servlet.ModelAndViewresolveException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex)
-
Constructor Details
-
TdsErrorHandling
public TdsErrorHandling()
-
-
Method Details
-
handle
@ExceptionHandler(ServiceNotAllowed.class) public org.springframework.http.ResponseEntity<String> handle(ServiceNotAllowed ex) -
handle
@ExceptionHandler(RequestTooLargeException.class) public org.springframework.http.ResponseEntity<String> handle(RequestTooLargeException ex) -
handle
@ExceptionHandler(MethodNotImplementedException.class) public org.springframework.http.ResponseEntity<String> handle(MethodNotImplementedException ex) -
handle
@ExceptionHandler(java.io.FileNotFoundException.class) public org.springframework.http.ResponseEntity<String> handle(FileNotFoundException ex) -
handle
@ExceptionHandler(java.io.IOException.class) public org.springframework.http.ResponseEntity<String> handle(IOException ex) -
handle
@ExceptionHandler(java.lang.UnsupportedOperationException.class) public org.springframework.http.ResponseEntity<String> handle(UnsupportedOperationException ex) -
handle
@ExceptionHandler(java.lang.IllegalArgumentException.class) public org.springframework.http.ResponseEntity<String> handle(IllegalArgumentException ex) -
handle
@ExceptionHandler(NcssException.class) public org.springframework.http.ResponseEntity<String> handle(NcssException ex) -
handle
@ExceptionHandler(org.springframework.web.bind.ServletRequestBindingException.class) public org.springframework.http.ResponseEntity<String> handle(org.springframework.web.bind.ServletRequestBindingException ex) -
handle
@ExceptionHandler(org.springframework.validation.BindException.class) public org.springframework.http.ResponseEntity<String> handle(org.springframework.validation.BindException ex) -
handle
@ExceptionHandler(java.lang.Throwable.class) public org.springframework.http.ResponseEntity<String> handle(Throwable ex) throws Throwable - Throws:
Throwable
-
resolveException
public org.springframework.web.servlet.ModelAndView resolveException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex) - Specified by:
resolveExceptionin interfaceorg.springframework.web.servlet.HandlerExceptionResolver
-