[wildfly-dev] Pretty-printing XML validation errors

Brian Stansberry brian.stansberry at redhat.com
Wed Aug 17 13:06:28 EDT 2016


> On Aug 17, 2016, at 11:50 AM, Toby Crawley <tcrawley at redhat.com> wrote:
> On Mon, Aug 15, 2016 at 8:08 PM, Brian Stansberry
> <brian.stansberry at redhat.com> wrote:
>> 
>>> On Aug 9, 2016, at 3:13 PM, Toby Crawley <tcrawley at redhat.com> wrote:
>>> * Handling errors that aren't created by ParseUtils - For any
>>> XMLStreamExceptions that don't get wrapped by ParseUtils, VDX now
>>> shows that error the best it can. This still doesn't handle errors
>>> that aren't XMLStreamExceptions, but is progress. This should also
>>> handle errors thrown from AttributeDefinitions, since they are
>>> XMLStreamExceptions.
>> 
>> What does the failure message look like when AttributeDefinition rejects an attribute? I want to make sure this is helping, not obscuring.
>> 
>> A simple test would be to change the ‘port’ attribute in a socket-binding element to -1.
> 
> That failure generates
> https://gist.github.com/tobias/dbf1fc6bb1e264273c0c96453eb9295d. Since
> VDX doesn't have further context about the error, it can't point
> directly to the offending attribute; it just uses the provided
> [row,col] from the error. Any XMLStreamExceptions that don't come from
> ParseUtils should look the same.

I think this looks ok. The WFLYCTL0117 error code is gone, but that’s fine. It looks better in the “pretty” part of the report to not have it and it’s still shown later, making it avaiable if it is needed.

-- 
Brian Stansberry
Manager, Senior Principal Software Engineer
JBoss by Red Hat






More information about the wildfly-dev mailing list