Examples of ExceptionResult


Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    @ExceptionHandler({ AuthenticationCredentialsNotFoundException.class })
    public ResponseEntity<ExceptionResult> unauthorized(Exception e) {
        MDCBuilder.buildMdcContext();
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(new ExceptionResult(e.getMessage()), HttpStatus.UNAUTHORIZED);
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    @ExceptionHandler({ HttpMessageNotReadableException.class, BadRequestException.class })
    public ResponseEntity<ExceptionResult> badRequest(Exception e) {
        MDCBuilder.buildMdcContext();
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(new ExceptionResult(e.getMessage()), HttpStatus.BAD_REQUEST);
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    }

    @ExceptionHandler({ AccessDeniedException.class, org.springframework.security.access.AccessDeniedException.class })
    public ResponseEntity<ExceptionResult> accessDenied(Exception e) {
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(new ExceptionResult(e.getMessage()), HttpStatus.FORBIDDEN);
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    @ExceptionHandler({ NotFoundException.class, EntityNotFoundException.class })
    public ResponseEntity<ExceptionResult> notFound(Exception e) {
        MDCBuilder.buildMdcContext();
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(new ExceptionResult(e.getMessage()), HttpStatus.NOT_FOUND);
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    @ExceptionHandler({ HttpRequestMethodNotSupportedException.class })
    public ResponseEntity<ExceptionResult> httpRequestMethodNotSupportedExceptionError(Exception e) {
        MDCBuilder.buildMdcContext();
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(new ExceptionResult("The requested http method not supported on the resource"), HttpStatus.BAD_REQUEST);
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    @ExceptionHandler({ Exception.class, RuntimeException.class })
    public ResponseEntity<ExceptionResult> serverError(Exception e) {
        MDCBuilder.buildMdcContext();
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(new ExceptionResult("Internal server error"), HttpStatus.INTERNAL_SERVER_ERROR);
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.json.ExceptionResult

    @ExceptionHandler({ DuplicateKeyValueException.class })
    public ResponseEntity<ExceptionResult> duplicatedName(DuplicateKeyValueException e) {
        MDCBuilder.buildMdcContext();
        LOGGER.error(e.getMessage(), e);
        return new ResponseEntity<>(
                new ExceptionResult("The name '" + e.getValue() + "' is already taken, please choose a different one"), HttpStatus.BAD_REQUEST);
    }
View Full Code Here

Examples of de.danet.an.workflow.spis.aii.ResultProvider.ExceptionResult

    }
      }
  } catch (IOException e) {
      logger.warn ("Problem accessing \"" + url
       + "\" (abandoning): " + e.getMessage ());
      result.set (new ExceptionResult ("CannotAccessException"));
      return;
  }
  if (statusCode == -1) {
      result.set (new ExceptionResult
      ("RetryCountExceededException"));
      return;
  }
  Map res = new HashMap ();
  result.set(res);
View Full Code Here

Examples of de.danet.an.workflow.spis.aii.ResultProvider.ExceptionResult

      Reader sr = new StringReader (script);
      cx.evaluateReader (scope, sr, "<script>", 1, null);
      result.set(convertResult(cx, scope, formPars));
  } catch (AbandonedException e) {
      // thrown when the activity was deliberatly abandoned.
      result.set (new ExceptionResult (e.getMessage ()));
  } catch (RemoteException e) {
      throw e;
  } catch (IOException e) {
      logger.error (e.getMessage(), e);
      throw new CannotExecuteException (e.getMessage());
View Full Code Here

Examples of de.danet.an.workflow.spis.aii.ResultProvider.ExceptionResult

    /* Comment copied from interface. */
    public void abandonActivity(String string)
  throws TransitionNotAllowedException {
  while (true) {
      try {
    engine.doAbandon (activity, new ExceptionResult(string));
    break;
      } catch (RemoteException e) {
    logger.debug ("Error while abandoning activity (repeating): "
            + e.getMessage (), e);
      }
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.