List of usage examples for org.springframework.http HttpStatus INTERNAL_SERVER_ERROR
HttpStatus INTERNAL_SERVER_ERROR
To view the source code for org.springframework.http HttpStatus INTERNAL_SERVER_ERROR.
Click Source Link
From source file:de.hska.ld.core.exception.ApplicationException.java
public ApplicationException() { this.httpStatus = HttpStatus.INTERNAL_SERVER_ERROR; }
From source file:us.polygon4.izzymongo.controller.AbstractController.java
@ExceptionHandler(Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public ModelAndView handleException(Exception ex) { log.error(ex.getMessage());/* ww w. j a v a 2 s. c om*/ return new ControllerException(ex.getMessage()).asModelAndView(); }
From source file:com.pivotal.gemfire.tools.pulse.internal.controllers.ExceptionHandlingAdvice.java
@ExceptionHandler(IOException.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public void handleExc(IOException ext) { // write errors StringWriter swBuffer = new StringWriter(); PrintWriter prtWriter = new PrintWriter(swBuffer); ext.printStackTrace(prtWriter);/*from www . j av a 2s .c o m*/ LOGGER.severe("IOException Details : " + swBuffer.toString() + "\n"); }
From source file:web.logging.ExceptionLoggerAdvice.java
@ExceptionHandler public void logException(HttpServletRequest request, HttpServletResponse response, Throwable ex) throws IOException { String url = extractUrlFromRequest(request); logException(url, ex);/*from w ww . ja v a 2 s . c o m*/ sendStatus(response, HttpStatus.INTERNAL_SERVER_ERROR); }
From source file:org.moserp.common.rest.ExceptionHandlingController.java
public ResponseEntity<Void> handleError(HttpServletRequest req, Exception exception) { logger.error("Request: " + req.getRequestURL() + " raised " + exception); ResponseEntity<Void> responseEntity = new ResponseEntity<Void>(HttpStatus.INTERNAL_SERVER_ERROR); return responseEntity; }
From source file:com.unidev.polycms.hateoas.controller.ControllerErrorHandler.java
@ExceptionHandler(Throwable.class) @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) @ResponseBody//from w w w . j av a 2 s .com public Response serviceError(HttpServletRequest req, Throwable e) { LOG.error("Error in handling request {}", req, e); Response<String, String> response = new Response<>(); response.setPayload("Service error"); response.setStatus("service-error"); return response; }
From source file:de.qucosa.spring.ResourceExceptionHandler.java
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ExceptionHandler public void generalExceptionHandler(Throwable ex) { log.error(ex.getMessage(), ex); }
From source file:edu.nwpu.gemfire.monitor.controllers.ExceptionHandlingAdvice.java
@ExceptionHandler(IOException.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public void handleExc(IOException ext) { PulseLogWriter LOGGER = PulseLogWriter.getLogger(); // write errors StringWriter swBuffer = new StringWriter(); PrintWriter prtWriter = new PrintWriter(swBuffer); ext.printStackTrace(prtWriter);// w w w . j a v a 2s. co m LOGGER.severe("IOException Details : " + swBuffer.toString() + "\n"); }
From source file:com.boundlessgeo.geoserver.api.exceptions.AppExceptionHandler.java
HttpStatus status(Exception e) { ResponseStatus status = e.getClass().getAnnotation(ResponseStatus.class); return status != null ? status.value() : HttpStatus.INTERNAL_SERVER_ERROR; }
From source file:com.create.controller.ErrorController.java
@RequestMapping(value = "/error/error", method = RequestMethod.GET) @ExceptionHandler(Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public String showInternalServerError() { return INTERNAL_SERVER_ERROR_TEMPLATE; }