Examples of ErrorType


Examples of org.apache.poi.ss.formula.functions.Errortype

        retval[233] = NumericFunction.ACOSH;
        retval[234] = NumericFunction.ATANH;

        retval[ID.EXTERNAL_FUNC] = null; // ExternalFunction is a FreeREfFunction

        retval[261] = new Errortype();

        retval[269] = AggregateFunction.AVEDEV;

        retval[276] = NumericFunction.COMBIN;
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.Errortype

        retval[233] = NumericFunction.ACOSH;
        retval[234] = NumericFunction.ATANH;

        retval[ID.EXTERNAL_FUNC] = null; // ExternalFunction is a FreeREfFunction

        retval[261] = new Errortype();

        retval[269] = AggregateFunction.AVEDEV;

        retval[276] = NumericFunction.COMBIN;
View Full Code Here

Examples of org.boris.expr.function.excel.ERRORTYPE

        CELL c = new CELL();
        fail("CELL not implemented");
    }

    public void testERRORTYPE() throws Exception {
        ERRORTYPE e = new ERRORTYPE();
        assertEquals(eval(e, ExprError.NULL), 1);
        assertEquals(eval(e, ExprError.DIV0), 2);
        assertEquals(eval(e, ExprError.VALUE), 3);
        assertEquals(eval(e, ExprError.VALUE), 3);
        assertEquals(eval(e, "asdf"), ExprError.NA);
View Full Code Here

Examples of org.jibx.ws.soap.testdata.basic.ErrorType

        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.DETAILED_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        expected.addDetail(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        expected.addDetail(new ErrorType("Severe"));
       
        assertEquals(expected, m_inCtx.getBody());
    }
View Full Code Here

Examples of org.jibx.ws.soap.testdata.basic.ErrorType

     */
    public void testSendFaultMessageWithCustomHandlers() throws Exception {
        SoapFault fault = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format",
            "http://example.org/someactor");
        MarshallingOutHandler detail1 = new MarshallingOutHandler(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        MarshallingOutHandler detail2 = new MarshallingOutHandler(new ErrorType("Severe"));
        fault.addDetailWriter(detail1);
        fault.addDetailWriter(detail2);
        m_processor.sendFaultMessage(fault, StubbedChannel.getOutConnection());

        XMLUnit.setIgnoreWhitespace(true);
View Full Code Here

Examples of org.jibx.ws.soap.testdata.basic.ErrorType

    }

    public void testSendFaultMessageWithCustomHandlers() throws Exception {
        SoapFault fault = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        MarshallingOutHandler detail1 = new MarshallingOutHandler(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        MarshallingOutHandler detail2 = new MarshallingOutHandler(new ErrorType("Severe"));
        fault.addDetailWriter(detail1);
        fault.addDetailWriter(detail2);
        m_OutInProcessor.sendFaultMessage(fault, StubbedChannel.getOutConnection());

        XMLUnit.setIgnoreWhitespace(true);
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.basic.ErrorType

    return instance;
  }
  
  public Long addErrorType(Long errortype_id, Long fieldvalues_id) {
    try {
      ErrorType eType = new ErrorType();
      eType.setErrortype_id(errortype_id);
      eType.setStarttime(new Date());
      eType.setDeleted("false");
      eType.setFieldvalues_id(fieldvalues_id);
      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      eType = session.merge(eType);
      Long newerrortype_id = eType.getErrortype_id();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return newerrortype_id;
    } catch (Exception ex2) {
      log.error("[addErrorType]: " + ex2);
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.basic.ErrorType

  @PersistenceContext
  private EntityManager em;

  public Long addErrorType(Long errortype_id, Long fieldvalues_id) {
    try {
      ErrorType eType = new ErrorType();
      eType.setErrortype_id(errortype_id);
      eType.setStarttime(new Date());
      eType.setDeleted("false");
      eType.setFieldvalues_id(fieldvalues_id);
      eType = em.merge(eType);
      Long newerrortype_id = eType.getErrortype_id();
      return newerrortype_id;
    } catch (Exception ex2) {
      log.error("[addErrorType]: ", ex2);
    }
    return null;
View Full Code Here

Examples of org.openrdf.http.protocol.error.ErrorType

  static final int STATUS_CODE = HttpURLConnection.HTTP_BAD_REQUEST;

  public static BadRequest create(String msg) {
    ErrorInfo errInfo = ErrorInfo.parse(msg);
    ErrorType type = errInfo.getErrorType();
    if (type == ErrorType.UNSUPPORTED_FILE_FORMAT) {
      return new UnsupportedFileFormat(errInfo.getErrorMessage());
    }
    else if (type == ErrorType.UNSUPPORTED_QUERY_LANGUAGE) {
      return new UnsupportedQueryLanguage(errInfo.getErrorMessage());
View Full Code Here

Examples of org.rhq.plugins.apache.AvailabilityResult.ErrorType

        }
        try {
            connection.connect();
        } catch (IOException e) {
            String errorMessage;
            ErrorType errorType = ErrorType.UNKNOWN;
            if (e instanceof ConnectException) {
                // This most likely just means the server is down.
                errorMessage = "Failed to connect to [" + httpURL + "].";
                errorType = ErrorType.CANNOT_CONNECT;
            } else if (e instanceof SocketTimeoutException) {
                // This probably means the server is up but not properly accepting connection requests.
                long connectDuration = System.currentTimeMillis() - connectStartTime;
                errorMessage = "Attempt to connect to [" + httpURL + "] timed out after " + connectDuration
                    + " milliseconds.";
                errorType = ErrorType.CONNECTION_TIMEOUT;
            } else {
                errorMessage = "An error occurred while attempting to connect to [" + httpURL + "].";
            }
            if (LOG.isDebugEnabled()) {
                LOG.warn(errorMessage, e);
            }
            return availabilityIsDown(errorType, errorMessage, e);
        }
        int connectDuration = (int) (System.currentTimeMillis() - connectStartTime);
        if (LOG.isDebugEnabled()) {
            LOG.debug("Connected to [" + httpURL + "] in " + connectDuration + " milliseconds.");
        }

        if ((timeout > 0) && (connectDuration >= timeout)) {
            String errorMessage = "Attempt to ping [" + httpURL + "] timed out after " + connectDuration
                + " milliseconds.";
            if (LOG.isDebugEnabled()) {
                LOG.warn(errorMessage);
            }
            return availabilityIsDown(ErrorType.CONNECTION_TIMEOUT, errorMessage);
        }

        try {
            int readTimeout = (timeout > 0) ? (timeout - connectDuration) : 0;
            connection.setReadTimeout(readTimeout);
            if (connection.getReadTimeout() != readTimeout) {
                if (LOG.isDebugEnabled()) {
                    LOG.warn("Failed to set read timeout on URLConnection for [" + httpURL
                            + "] - this most likely means we're running in a non-standard JRE.");
                }
            }

            // Now actually send the request and read the response.
            long readStartTime = System.currentTimeMillis();
            if (LOG.isDebugEnabled()) {
                LOG.debug("Sending " + connection.getRequestMethod() + " request to [" + httpURL + "]...");
            }
            try {
                // Calling getResponseCode() will cause the request to be sent.
                int responseCode = connection.getResponseCode();
                if (LOG.isDebugEnabled()) {
                    if (responseCode == -1) {
                        LOG.warn("Ping request to [" + httpURL + "] returned an invalid response: "
                            + getResponseBody(connection));
                    } else if (responseCode >= 500) {
                        LOG.warn("Ping request to [" + httpURL + "] returned a response with server error "
                            + responseCode + " (" + connection.getResponseMessage() + "): "
                            + getResponseBody(connection));
                    } else if (responseCode >= 400) {
                        LOG.warn("Ping request to [" + httpURL + "] returned a response with client error "
                            + responseCode + " (" + connection.getResponseMessage() + ").");
                    }
                }
            } catch (IOException e) {
                String errorMessage;
                ErrorType errorType = ErrorType.UNKNOWN;
                if (e instanceof SocketTimeoutException) {
                    long readDuration = System.currentTimeMillis() - readStartTime;
                    errorMessage = "Attempt to read response from " + connection.getRequestMethod() + " request to ["
                        + httpURL + "] timed out after " + readDuration + " milliseconds.";
                    errorType = ErrorType.CONNECTION_TIMEOUT;
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.