]> git.kaiwu.me - njs.git/commit
XML: fixed exception classes
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 3 Jun 2026 02:07:15 +0000 (19:07 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 3 Jun 2026 21:34:17 +0000 (14:34 -0700)
commit5ea549cf54ce0de22e2c10b1c470406cb90f4725
tree88db672740eb839f8d3ac126565e26d9e33fcccf
parentbce77d44c0959d1a63934f04e4ae2ed86cda6819
XML: fixed exception classes

Report XML API misuse as TypeError and XML parse failures as SyntaxError,
aligning njs and QuickJS behavior.

The QuickJS message "'this' is not XMLNode or XMLDoc" is changed to
"value is not XMLNode or XMLDoc" because qjs_xml_node() is not always
validating this.
external/njs_xml_module.c
external/qjs_xml_module.c
test/xml/xml.t.mjs