Actions
Bug #4779
closedBad command line parameters cause internal error and stack trace
Start date:
2020-10-04
Due date:
% Done:
100%
Estimated time:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-
Description
Incorrect parameter syntax on the xslt3 command line can trigger an internal error and a stack trace,
Example: a call with
xslt3 -xsl:xx.xsl.sef -s:samples.xml -o:out.xml -t shigher-order-functions
Generates
Missing '=' in parameter 'shigher-order-functions'
Internal error: bad input to string constructor #undefined
Error
at Object.$internalError$$ [as internalError] (/Users/mike/GitHub/saxon-js-enterprise/build/temp/js/build/SaxonJS2N.debug.js:886:56)
at new $XdmString$$module$temp$js$source$src$XdmAtomic$ (/Users/mike/GitHub/saxon-js-enterprise/build/temp/js/build/SaxonJS2N.debug.js:1346:72)
at Object.fromString (/Users/mike/GitHub/saxon-js-enterprise/build/temp/js/build/SaxonJS2N.debug.js:2043:12)
at /Users/mike/GitHub/saxon-js-enterprise/build/temp/js/build/xslt3ee.js:46:228
at Array.forEach (<anonymous>)
....etc
Updated by Michael Kay about 4 years ago
The problem is that the method quit() in command.js doesn't do what it says; I think it once did, but this was changed when we made everything asynchronous.
Updated by Norm Tovey-Walsh almost 4 years ago
- Status changed from New to Resolved
Without trying to hard to unwind the parallelism, there were two easy fixes:
- Throw an
XError
instead of anError
for a bad command line option. That makescommand.js
print only the message, not the stack trace. - After checking the command line arguments in
main
; if something's gone wrong, return without trying to do any further processing.
Updated by Debbie Lockett over 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Actions
Also available in: Atom PDF Tracking page