[JAXP-51] XPath.compile() in std impl of Java5 throws XPathExpressionException with unhelpful null message Created: 13/Feb/08  Updated: 13/Feb/08

Status: Open
Project: jaxp
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Type: Bug Priority: Minor
Reporter: kwblackwell Assignee: jaxp-issues
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: All


Issuezilla Id: 51

 Description   

At this moment, this defect still needs some verification and qualification as
to what versions it applies to.

I noticed this using the latest Java 5 standard implementation of XPath capability.

If you feed some garbage string to an XPath object's "compile()" method, it will
throw (as expected) an XPathExpressionException. But when you call getMessage()
on that exception, it returns null. What I would expect here is a message
identifying what went wrong during the parsing or compiling, even if it is
relatively generic.

Generally speaking, exceptions with no message are reasonable only if the class
name itself is all you need to know. In this case, anyone trying to craft an
XPath expression will need more information than just that it doesn't compile.
Where was the error? What type of error was it? What token was unexpected? Etc.


Generated at Thu Jun 30 02:54:53 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.