You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Nik Haldimann (JIRA)" <ji...@apache.org> on 2008/05/01 02:08:55 UTC

[jira] Created: (SHINDIG-219) Improve XML parse error messages

Improve XML parse error messages
--------------------------------

                 Key: SHINDIG-219
                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
             Project: Shindig
          Issue Type: Improvement
          Components: Gadget Rendering Server (Java)
            Reporter: Nik Haldimann
            Priority: Minor
         Attachments: improve-xml-parse-errors.patch

On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.

This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-219) Improve XML parse error messages

Posted by "Nik Haldimann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593596#action_12593596 ] 

Nik Haldimann commented on SHINDIG-219:
---------------------------------------

It appears that a Shindig XmlException can actually wrap exceptions other than SAXParseErrors (see XmlUtil#parse)), so I'm not sure how to add line/column in a clean way. Do you have a suggestion? In any case, I think that should be a separate patch.

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-219) Improve XML parse error messages

Posted by "Nik Haldimann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nik Haldimann updated SHINDIG-219:
----------------------------------

    Attachment: improve-xml-parse-errors.patch

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-219) Improve XML parse error messages

Posted by "Vincent Siveton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton updated SHINDIG-219:
------------------------------------

    Attachment: SHINDIG-219-v3.patch

SHINDIG-219-v3.patch is a more simple solution. Please choose one!

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch, SHINDIG-219-v1.patch, SHINDIG-219-v2.patch, SHINDIG-219-v3.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-219) Improve XML parse error messages

Posted by "Nik Haldimann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593846#action_12593846 ] 

Nik Haldimann commented on SHINDIG-219:
---------------------------------------

Simpler is better, I like v3 the best.

Any kind soul willing to apply both Vincent's and my patch?

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch, SHINDIG-219-v1.patch, SHINDIG-219-v2.patch, SHINDIG-219-v3.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-219) Improve XML parse error messages

Posted by "Vincent Siveton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593509#action_12593509 ] 

Vincent Siveton commented on SHINDIG-219:
-----------------------------------------

In the same vein, as SAXParseErrors has columnNumber and lineNumber, XmlException (defined in XmltUtil#parse() ) should have them too.
With this, the SpecParserException will be more precise.


> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SHINDIG-219) Improve XML parse error messages

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Brown closed SHINDIG-219.
-------------------------------

    Resolution: Fixed

Applied. Thanks for the contributions!

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch, SHINDIG-219-v1.patch, SHINDIG-219-v2.patch, SHINDIG-219-v3.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-219) Improve XML parse error messages

Posted by "Nik Haldimann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593676#action_12593676 ] 

Nik Haldimann commented on SHINDIG-219:
---------------------------------------

Great, I like version 1. But I would prefer the XmlParseException to be its own class, rather than a static inner class of XmlException.

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch, SHINDIG-219-v1.patch, SHINDIG-219-v2.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-219) Improve XML parse error messages

Posted by "Vincent Siveton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton updated SHINDIG-219:
------------------------------------

    Attachment: SHINDIG-219-v2.patch
                SHINDIG-219-v1.patch

I provided 2 versions of my suggestions.
I also provided the javadoc

> Improve XML parse error messages
> --------------------------------
>
>                 Key: SHINDIG-219
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-219
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>            Reporter: Nik Haldimann
>            Priority: Minor
>         Attachments: improve-xml-parse-errors.patch, SHINDIG-219-v1.patch, SHINDIG-219-v2.patch
>
>
> On malformed gadget specs and message bundles, Shindig currently passes through SAXParseErrors which are fairly opaque. At the Shindig client level there is also no way to figure out which file (gadget spec or message bundle) is malformed.
> This patch includes the file name in the SpecParserException message which improves the situation a bit. Includes tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.