Uploaded image for project: 'JaxMe'
  1. JaxMe
  2. JAXME-7

PATCH JMHandlerImpl improved exception text

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • current (nightly)
    • None
    • JaxMe Core
    • None
    • Operating System: Other
      Platform: Other
    • 24311

    Description

      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); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            hvendelbo@bluprints.com Henrik Vendelbo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: