Examples of FailureType


Examples of com.netflix.hystrix.exception.HystrixRuntimeException.FailureType

  @ExceptionHandler(value = { HystrixRuntimeException.class })
  public final ResponseEntity<?> handleException(HystrixRuntimeException e, WebRequest request) {
    HttpStatus status = HttpStatus.SERVICE_UNAVAILABLE;
    String message = e.getMessage();

    FailureType type = e.getFailureType();

    // 对命令抛出的异常进行特殊处理
    if (type.equals(FailureType.COMMAND_EXCEPTION)) {
      status = HttpStatus.INTERNAL_SERVER_ERROR;
      message = Exceptions.getErrorMessageWithNestedException(e);
    }

    logger.error(message, e);
View Full Code Here

Examples of net.solosky.maplefetion.event.action.FailureType

      ActionEvent event = future.waitActionEventWithoutException();
      if(event.getEventType()==ActionEventType.SUCCESS){
        this.updateLoginState(LoginState.SIPC_REGISGER_SUCCESS, null);
      }else if(event.getEventType()==ActionEventType.FAILURE){
        FailureEvent evt = (FailureEvent) event;
        FailureType type =  evt.getFailureType();
        if(type==FailureType.REGISTER_FORBIDDEN){
          throw new LoginException(LoginState.SIPC_ACCOUNT_FORBIDDEN); //帐号限制登录,可能存在不安全因素,请修改密码后再登录
        }else if(type==FailureType.AUTHORIZATION_FAIL){
          throw new LoginException(LoginState.SIPC_AUTH_FAIL);      //登录验证失败
        }else{
View Full Code Here

Examples of org.mule.common.FailureType

            return new DefaultTestResult(TestResult.Status.SUCCESS);
        }
        catch (Exception e)
        {
            // this surely doesn't cover all cases for all kinds of jdbc drivers but it is better than nothing
            FailureType failureType = FailureType.UNSPECIFIED;
            String msg = e.getMessage();
            if (msg != null && msg.contains("Communications link failure"))
            {
                failureType = FailureType.CONNECTION_FAILURE;
            }
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.