New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlpoke with failonerror=true does not fail when xpath matches zero nodes #44

Closed
scalder opened this Issue May 8, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@scalder
Contributor

scalder commented May 8, 2012

The behaviour between xmlpeek and xmlpoke is different, with regards to the xpath node matches. In both cases, if failonerror=false, a Warning is logged and processing continues (expected behaviour). Likewise, with failonerror=true, if there are zero nodes found with the xpath match in xmlpeek, it fails processing (also expected behaviour). Intuitively I would expect xmlpoke to also fail if zero nodes are matched and failonerror=true... however it does not. Instead it just does the same behaviour as when failonerror=false.

Arguable whether this is a bug or a "feature" now that it has existed like this for so long. Personally I'd call it a bug. I plan to submit a patch that corrects the behaviour of xmlpoke when failonerror=true and zero nodes are matched by the xpath... and if people want xmlpoke to continue with it's current behaviour they can always just set failonerror=false.

@scalder

This comment has been minimized.

Show comment
Hide comment
@scalder

scalder May 8, 2012

Contributor

Pull request containing the fix: #45

Contributor

scalder commented May 8, 2012

Pull request containing the fix: #45

@scalder

This comment has been minimized.

Show comment
Hide comment
@scalder

scalder May 9, 2012

Contributor

Pull request containing the fix, without additional formatting changes: #46

Contributor

scalder commented May 9, 2012

Pull request containing the fix, without additional formatting changes: #46

@rmboggs

This comment has been minimized.

Show comment
Hide comment
@rmboggs

rmboggs May 14, 2012

Member

Pull request #46 has been pulled to master. Thanks.

Member

rmboggs commented May 14, 2012

Pull request #46 has been pulled to master. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment