You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for writing this. It's a great little tool that does it's job well, and I love the declaritive style.
One issue I wanted to point out though is that the exceptions that are thrown leave much to be desired in terms of usefulness. I'm stuck right now on processing an xml file because I get:
In my case, I've deduced that the problem is likely something not being marked as optional that should be and I'm sure I'll track it down shortly, but I had to figure that out on my own. At the VERY least, it would be extremely helpful if the error message explained what the current state of the parser was at the time it found an issue. What node was the parser looking at where it couldn't find an attribute "name"? Or is this an issue with the user_object being passed in not having an attribute called "name"? It's too vague which lead to me having to spend quite a bit of extra time stepping through declxml code to figure out what was going on.
Just a suggestion.
The text was updated successfully, but these errors were encountered:
That is a very good point, I think we can absolutely use the context of the parser's state to provide useful error messages. It can definitely get confusing if you have multiple attributes with the same name to know which one is missing.
PR #3 should help improve error messages by providing some context information about where we were when the error occurred for both parsing and serialization.
First, thanks for writing this. It's a great little tool that does it's job well, and I love the declaritive style.
One issue I wanted to point out though is that the exceptions that are thrown leave much to be desired in terms of usefulness. I'm stuck right now on processing an xml file because I get:
declxml.MissingValue: Missing required element: "name"
In my case, I've deduced that the problem is likely something not being marked as optional that should be and I'm sure I'll track it down shortly, but I had to figure that out on my own. At the VERY least, it would be extremely helpful if the error message explained what the current state of the parser was at the time it found an issue. What node was the parser looking at where it couldn't find an attribute "name"? Or is this an issue with the user_object being passed in not having an attribute called "name"? It's too vague which lead to me having to spend quite a bit of extra time stepping through declxml code to figure out what was going on.
Just a suggestion.
The text was updated successfully, but these errors were encountered: