Project

Profile

Help

Bug #3961

checkException() method sometimes returns NULL

Added by O'Neil Delpratt 10 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
Saxon-C Internals
Start date:
2018-10-10
Due date:
% Done:

100%

Found in version:
1.1.0
Fixed in version:
1.1.2

Description

Reported by user:

The checkException() method sometimes returns NULL for the different processors such as XsltProcessor, SchemaValidator, XQueryProcessor and XPathProcessor.

Investigating the code for the checkException() method it calls the method checkForException() in the file SaxonCGlue.c. Internally it is looking for the net.sf.saxon.s9api.SaxonApiException exception. Therefore it ignores other exceptions unless the DEBUG option is on (We should review if this is the right thing to do).

The design is to catch all kinds of exceptions on Java and wrap them as SaxonApiException. But it looks like there are a few places where we are not doing that.


Related issues

Related to Saxon/C - Bug #3963: exceptionOccurred does not return true when exceptionCount() > 1 for XsltProcessor Closed 2018-10-10 Actions

History

#1 Updated by O'Neil Delpratt 6 months ago

  • Status changed from New to In Progress

Update:

Finally managed to look at this bug issue again. The problem is in the C++ code base for the processors: XSLT, XQuery, Schema and XPath we use in some places the method checkForExceptionCPP without the user requesting for it which creates an SaxonApiException object which contains a list of errors found after the execution of the processor. This method clears the JNI exception occurs notification.

Strangely when the user calls the method checkException this calls the C function checkForException. At this stage the exception has already been cleared therefore no exception is going to be reported.

This bug is related to #3963

#2 Updated by O'Neil Delpratt 6 months ago

  • Related to Bug #3963: exceptionOccurred does not return true when exceptionCount() > 1 for XsltProcessor added

#3 Updated by O'Neil Delpratt 6 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Better handling of reporting exception messages.

Bug fixed and committed to subversion

#4 Updated by O'Neil Delpratt 5 months ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 1.1.2

Bug fix applied in the Saxon/C 1.1.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF