Examples of ErrorInfo


Examples of org.apache.empire.commons.ErrorInfo

     * @see org.apache.empire.struts2.action.ActionErrorProvider#getLastActionError(boolean)
     */
    public ErrorInfo getLastActionError(boolean clear)
    {
        ActionContext context = ActionContext.getContext();
        ErrorInfo error = (ErrorInfo)context.getSession().get(LAST_ACTION_ERROR_ATTRIBUTE);
        if (clear)
            context.getSession().remove(LAST_ACTION_ERROR_ATTRIBUTE);
        return error;
    }
View Full Code Here

Examples of org.apache.empire.commons.ErrorInfo

    // ------- render helpers -------
   
    private void renderAllErrors(HtmlWriter w, ActionErrorProvider provider)
    {
        // Get errors
        ErrorInfo lastActionError = provider.getLastActionError(true);
        Map<String, ErrorInfo> fieldErrors = provider.getItemErrors();
       
        boolean hasActionError = (lastActionError!=null && lastActionError.hasError());
        boolean hasFieldErrors = (fieldErrors!=null && fieldErrors.size()>0);

        // Check whether we have an error to render
        if (hasActionError==false && hasFieldErrors==false)
        {   // No Errors, nothing to render
View Full Code Here

Examples of org.apache.empire.commons.ErrorInfo

     * @see org.apache.empire.struts2.action.ActionErrorProvider#getLastActionError(boolean)
     */
    public ErrorInfo getLastActionError(boolean clear)
    {
        ActionContext context = ActionContext.getContext();
        ErrorInfo error = (ErrorInfo)context.getSession().get(LAST_ACTION_ERROR_ATTRIBUTE);
        if (clear)
            context.getSession().remove(LAST_ACTION_ERROR_ATTRIBUTE);
        return error;
    }
View Full Code Here

Examples of org.apache.empire.struts2.action.ErrorInfo

    // ------- render helpers -------
   
    private void renderAllErrors(HtmlWriter w, ActionErrorProvider provider)
    {
        // Get errors
        ErrorInfo lastActionError = provider.getLastActionError(true);
        Map<String, ErrorInfo> fieldErrors = provider.getItemErrors();
       
        boolean hasActionError = (lastActionError!=null); //  && lastActionError.hasError());
        boolean hasFieldErrors = (fieldErrors!=null && fieldErrors.size()>0);
View Full Code Here

Examples of org.apache.woden.ErrorInfo

                            String message,
                            short severity,
                            Exception exception)
    throws WSDLException
    {
        ErrorInfo errorInfo =
            new ErrorInfoImpl(errLoc, errorId, message, exception);

        ErrorHandler eh =
            (fErrorHandler != null) ? fErrorHandler : fDefaultErrorHandler;
       
        if(severity == SEVERITY_WARNING) {
            eh.warning(errorInfo);
        }
        else if(severity == SEVERITY_ERROR) {
            eh.error(errorInfo);
        }
        else if(severity == SEVERITY_FATAL_ERROR) {
            eh.fatalError(errorInfo);
           
            // Fatal error strategy is to terminate with a WSDLException.
           
            if(exception == null) {
                throw new WSDLException(WSDLException.INVALID_WSDL,
                        "Fatal WSDL error:\n" + errorInfo.toString());
            }
            else if(exception instanceof WSDLException) {
                throw (WSDLException)exception;
            }
            else {
View Full Code Here

Examples of org.apache.woden.ErrorInfo

       
        write(SUCCESS, success);
       
        for(int i = 0; i < errorInfos.size(); i ++) {
           
            ErrorInfo errorInfo = (ErrorInfo) errorInfos.elementAt(i);
            String severity = (String) severities.elementAt(i);
           
            write(severity, errorInfo);
        }
       
View Full Code Here

Examples of org.apache.woden.ErrorInfo

    public void testInvalidValue() throws Exception
    {
        String attrVal = "#rubbish";
        attr = new IntOrTokenAnyAttrImpl(el, qn, attrVal, reporter);
       
        ErrorInfo errInfo = (ErrorInfo)handler.errors.get("WSDL512");
        assertNotNull("An error should have been reported", errInfo);
        assertEquals("Error 'WSDL512' expected but error reported was '" + errInfo.getKey() + "'.",
                "WSDL512",
                errInfo.getKey());
       
        assertFalse("isValid() should return false", attr.isValid());
        assertFalse("isInt() should return false", attr.isInt());
        assertFalse("isToken() should return false", attr.isToken());
        assertNull("getInt() should return null", attr.getInt());
View Full Code Here

Examples of org.apache.woden.ErrorInfo

    public void testNullValue() throws Exception
    {
        String attrVal = null;
        attr = new IntOrTokenAnyAttrImpl(el, qn, attrVal, reporter);
       
        ErrorInfo errInfo = (ErrorInfo)handler.errors.get("WSDL512");
        assertNotNull("An error should have been reported", errInfo);
        assertEquals("Error 'WSDL512' expected but error reported was '" + errInfo.getKey() + "'.",
                "WSDL512",
                errInfo.getKey());
       
        assertFalse("isValid() should return false", attr.isValid());
        assertFalse("isInt() should return false", attr.isInt());
        assertFalse("isToken() should return false", attr.isToken());
        assertNull("getInt() should return null", attr.getInt());
View Full Code Here

Examples of org.apache.woden.ErrorInfo

    public void testNullValue() throws Exception
    {
        String attrVal = null;
        attr = new TokenAttrImpl(el, qn, attrVal, reporter);
       
        ErrorInfo errInfo = (ErrorInfo)handler.errors.get("WSDL508");
        assertNotNull("An error should have been reported", errInfo);
        assertEquals("Error 'WSDL508' expected but error reported was '" + errInfo.getKey() + "'.",
                "WSDL508",
                errInfo.getKey());
       
        assertNull("Attribute value is not null", attr.getToken());
        assertFalse("Attribute value should not be valid", attr.isValid());
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ErrorInfo

    }
    return -1;
  }

  private void report(int state, Segment errorSeg, Node node) {
    ErrorInfo info = new ErrorInfoImpl(state, errorSeg, node);
    reporter.report(info);
  }
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.