Examples of ExceptionDto


Examples of org.camunda.bpm.engine.rest.dto.ExceptionDto

@Provider
public class JsonMappingExceptionHandler implements ExceptionMapper<JsonMappingException> {

  @Override
  public Response toResponse(JsonMappingException exception) {
    ExceptionDto dto = ExceptionDto.fromException(exception);
    return Response.status(Status.BAD_REQUEST).entity(dto).type(MediaType.APPLICATION_JSON_TYPE).build();
  }
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.ExceptionDto

        .type(MediaType.APPLICATION_JSON_TYPE)
        .build();
     
    } else {
     
      ExceptionDto exceptionDto = ExceptionDto.fromException(exception);
     
      return Response
        .serverError()
        .entity(exceptionDto)
        .type(MediaType.APPLICATION_JSON_TYPE)
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.ExceptionDto

  private static final Logger LOGGER = Logger.getLogger(ExceptionHandler.class.getSimpleName());

  @Override
  public Response toResponse(RestException exception) {
    ExceptionDto dto = ExceptionDto.fromException(exception);

    LOGGER.log(Level.WARNING, getStackTrace(exception));
   
    if (exception.getStatus() != null) {
      return Response.status(exception.getStatus()).entity(dto).type(MediaType.APPLICATION_JSON_TYPE).build();
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.ExceptionDto

  private static final Logger LOGGER = Logger.getLogger(ExceptionHandler.class.getSimpleName());

  @Override
  public Response toResponse(Exception exception) {
    ExceptionDto dto = ExceptionDto.fromException(exception);

    LOGGER.log(Level.WARNING, getStackTrace(exception));
   
    return Response.serverError().entity(dto).type(MediaType.APPLICATION_JSON_TYPE).build();
  }
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.ExceptionDto

@Provider
public class JsonParseExceptionHandler implements ExceptionMapper<JsonParseException> {

  @Override
  public Response toResponse(JsonParseException exception) {
    ExceptionDto dto = ExceptionDto.fromException(exception);
    return Response.status(Status.BAD_REQUEST).entity(dto).type(MediaType.APPLICATION_JSON_TYPE).build();
  }
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.ExceptionDto

    String engineName = extractEngineName(requestUrl);
    ProcessEngine engine = getAddressedEngine(engineName);

    if (engine == null) {
      resp.setStatus(Status.NOT_FOUND.getStatusCode());
      ExceptionDto exceptionDto = new ExceptionDto();
      exceptionDto.setType(InvalidRequestException.class.getSimpleName());
      exceptionDto.setMessage("Process engine " + engineName + " not available");
      ObjectMapper objectMapper = new ObjectMapper();

      resp.setContentType(MediaType.APPLICATION_JSON);
      objectMapper.writer().writeValue(resp.getWriter(), exceptionDto);
      resp.getWriter().flush();
View Full Code Here

Examples of org.geomajas.global.ExceptionDto

            log.warn(msg);
          }
         
          // For each exception, make sure the entire exception is sent to the client:
          response.getErrorMessages().add(msg);
          response.getExceptions().add(new ExceptionDto(t.getClass().getName(), msg, t.getStackTrace()));
        }
      }

      response.setExecutionTime(System.currentTimeMillis() - begin);
      if (log.isTraceEnabled()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.