Examples of Error


Examples of Express.services.Error

     *     StartMethod is overridden to provide a known entry point<br>
     *     for all Windows.<br>
     * <p>
     */
    public void startMethod() {
        throw new Error(Error.GEN_UNIMPLEMENTED, "ExpressClassWindow.StartMethod", this).getException();
    }
View Full Code Here

Examples of akka.event.Logging.Error

     * #3671: Let the application specify custom MDC values
     * Java backward compatibility check
     */
    @Test
    public void mustBeAbleToCreateLogEventsWithOldConstructor() throws Exception {
        assertNotNull(new Error(new Exception(), "logSource", this.getClass(), "The message"));
        assertNotNull(new Error("logSource", this.getClass(), "The message"));
        assertNotNull(new Warning("logSource", this.getClass(), "The message"));
        assertNotNull(new Info("logSource", this.getClass(), "The message"));
        assertNotNull(new Debug("logSource", this.getClass(), "The message"));
    }
View Full Code Here

Examples of aleph.comm.message.Error

   **/
  public static void error (String message) {
    try {
      CommunicationManager cManager = CommunicationManager.getManager();
      cManager.send(cManager.getConsoleAddress(),
                    new Error(message));
    } catch (Exception e) {
      Aleph.panic(e);
    }
  }
View Full Code Here

Examples of algoD.helpers.ERROR

            case 1:
            case 2:
            case 3:
            case 4:
            case 0:
                ERROR e = new ERROR();
                e.code = 911;
                e.where = "current code at line "+program.getCurrent();
                e.text = "Failed to process line >>> "+line;
                e.moarText = new MultiString("The word "+SimString.rmAfter(line, '-')+" might be misspelled");
                e.moarText.addL("no translations were found, you might want to check");
View Full Code Here

Examples of br.com.objectos.comuns.sitebricks.form.FormResponse.Error

    assertThat(res.isValid(), equalTo(false));

    List<Error> errors = res.getErrors();
    assertThat(errors.size(), equalTo(1));

    Error e0 = errors.get(0);
    assertThat(e0.getName(), equalTo("f"));
    assertThat(e0.getMessage(), equalTo("a"));

    assertThat(res.getRedirectUrl(), nullValue());
  }
View Full Code Here

Examples of br.com.objectos.way.io.Table.Error

    public Wrapper parse() {
      try {
        entity = parser.parseLine(line);
      } catch (Exception e) {
        Error error = TableRowError.fromException(line, e);
        errors = ImmutableList.of(error);
      }
      return this;
    }
View Full Code Here

Examples of br.com.objectos.way.ui.form.FormResponse.Error

    assertThat(res.isValid(), equalTo(false));

    List<Error> errors = res.getErrors();
    assertThat(errors.size(), equalTo(1));

    Error e0 = errors.get(0);
    assertThat(e0.getName(), equalTo("f"));
    assertThat(e0.getMessage(), equalTo("a"));

    assertThat(res.getRedirectUrl(), nullValue());
  }
View Full Code Here

Examples of ca.uhn.model.json.Error

    String error = cause.getMessage();
    error = (null == error) ? "Unknown error" : error;

    if (cause instanceof InvalidParamsException) {
      log.error(cause.getMessage());
      return gson.toJson(new Error(error, Error.INVALID_PARAMS));
    } else if (cause instanceof MethodNotFoundException) {
      log.error(cause.getMessage());
      return gson.toJson(new Error(error, Error.METHOD_NOT_FOUND));
    } else if (cause instanceof InternalErrorException) {
      log.error("Internal Error", cause);
      return gson.toJson(new Error(error, Error.INTERNAL_ERROR));
    } else if (cause instanceof AuthorizationErrorException) {
      log.error("Authorization Error", cause);
      return gson.toJson(new Error(error, Error.AUTHORIZATION_ERROR));
    } else if (cause instanceof LimitReachedException) {
      log.error("Max records limit reached", cause);
      return gson.toJson(new Error(error, Error.LIMIT_REACHED_ERROR));
    }
    else {
      log.error("Unknown error occurred while processing the request", cause);
      return gson.toJson(new Error(error, Error.FATAL));
    }
  }
View Full Code Here

Examples of ch.powerunit.report.Error

    tc.setTime((end - tc.getTime()) / 1000);
    ts.setTime(ts.getTime() + tc.getTime());
    error = true;
    ts.setErrors(ts.getErrors() + 1);

    Error e = new Error();
    tc.getError().add(e);
    e.setType(cause.getClass().getCanonicalName());
    e.setMessage(cause.getMessage());
    StringBuffer stack = new StringBuffer(cause.getMessage()).append('\n');
    for (StackTraceElement ste : cause.getStackTrace()) {
      stack.append(ste.toString()).append('\n');
    }
    e.setContent(stack.toString());
  }
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.Error

      }
    };
  }

  private Error validate(Auth auth) {
    com.alu.e3.prov.restapi.model.Error error = new Error();
    error.setErrorText("");
    boolean inError = false;

    // Do some validation
    AuthType authType = auth.getType();
    if(authType == null){
      inError = true;
      error.setErrorText("Could not determine auth-type from request.");     
    } else {
      if(authType.equals(AuthType.BASIC)){
        BasicAuth basicAuth = auth.getBasicAuth();
        if(basicAuth == null){
          inError = true;
          error.setErrorText("Request did not contain BasicAuth info.");
        } else {
          if(basicAuth.getUsername() == null || basicAuth.getUsername().isEmpty()){
            inError = true;
            error.setErrorText("Username must not be empty for Basic authentication type.");
          }
          if(basicAuth.getPassword() == null || basicAuth.getPassword().length <= 0){
            inError = true;
            error.setErrorText(error.getErrorText()+" Password must not be empty for Basic authentication type.");
          }
        }
      }
      else if(authType.equals(AuthType.WSSE)){
        WSSEAuth basicAuth = auth.getWsseAuth();
        if(basicAuth == null){
          inError = true;
          error.setErrorText("Request did not contain WsseAuth info.");
        } else {
          if(basicAuth.getUsername() == null || basicAuth.getUsername().isEmpty()){
            inError = true;
            error.setErrorText("Username must not be empty for WSSE authentication type.");
          }
          if(basicAuth.getPassword() == null || basicAuth.getPassword().length <= 0){
            inError = true;
            error.setErrorText(error.getErrorText()+" Passowrd must not be empty for WSSE authentication type.");
          }
        }
      }
      else if(authType.equals(AuthType.AUTHKEY)){
        AuthKeyAuth authKeyAuth = auth.getAuthKeyAuth();
        if(authKeyAuth == null) {
          inError = true;
          error.setErrorText("Request did not contain AuthKeyAuth info.");         
        } else {
          if(authKeyAuth.getKeyValue()== null || authKeyAuth.getKeyValue().isEmpty()){
            inError = true;
            error.setErrorText("authKey must not be empty for AuthKey authentication type.")
          }
        }
      }
      else if(authType.equals(AuthType.IP_WHITE_LIST)){
        IpWhiteList ipWhiteListAuth = auth.getIpWhiteListAuth();
        if(ipWhiteListAuth == null) {
          inError = true;
          error.setErrorText("Request did not contain ipWhiteListAuth info.");             
        } else {
          // We don't check for null ipList here, but could ....
          List<String> ipList = ipWhiteListAuth.getIp();
          // Check for duplicate white-list ips by adding all members of list to a Set
          Set<String> testSet = new HashSet<String>();
          for (String ip : ipList) {
            if (testSet.contains(ip)) {
              if(LOG.isDebugEnabled())
                LOG.debug("Found duplicate whitelist ip: {}", ip);
              inError = true;
              error.setErrorText("Duplicate ip in white-list: " + ip);
              break;
            }
            testSet.add(ip);
          }
        }
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.