ws-jaxme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24311] New: - PATCH JMHandlerImpl improved exception text
Date Sat, 01 Nov 2003 00:59:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24311>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24311

PATCH JMHandlerImpl improved exception text

           Summary: PATCH JMHandlerImpl improved exception text
           Product: JaxMe
           Version: current (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: JaxMe Core
        AssignedTo: jaxme-dev@ws.apache.org
        ReportedBy: hvendelbo@bluprints.com


The current text seemed very confusing on an issue today. Only after 2 hours 
did I realise that I was actually dealing with empty values. This patch adds 
quotes around the offending values, so empty values are immediately obvious.


  public void addAttribute(String pNamespaceURI, String pLocalName,
                            String pValue) throws SAXException {
    throw new SAXParseException("Unknown attribute: '" + pLocalName +
                                 "' in namespace '" + pNamespaceURI +"'",
                                 getDocumentLocator());
  }

  public void startElement(String pNamespaceURI, String pLocalName,
                            String pQName, Attributes pAttr) throws 
SAXException {
    validationEvent(ValidationEvent.WARNING,
                    "Unexpected element: '" + pQName + "'",
                    ValidationEvents.EVENT_UNEXPECTED_CHILD_ELEMENT);
  }

  public void characters(char[] pChars, int pOffset, int pLen) throws 
SAXException {
    for (int i = 0;  i < pLen;  i++) {
      if (!Character.isWhitespace(pChars[pOffset+i])) {
        validationEvent(ValidationEvent.WARNING, "Unexpected non-whitespace 
characters:'" +
                        new String(pChars, pOffset, pLen) + "'",
                        ValidationEvents.EVENT_UNEXPECTED_TEXTUAL_CONTENTS);
      }
    }
  }

  public void endElement(String pNamespaceURI, String pLocalName,
                          String pQName) throws SAXException {
    validationEvent(ValidationEvent.WARNING,
                    "Unexpected element: '" + pQName + "'",
                    ValidationEvents.EVENT_UNEXPECTED_CHILD_ELEMENT);
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Mime
View raw message