Hi Omar,
Thanks for your observation.
We have removed the BaseX-specific string output, as it was redundant. You should be able to reproduce the old output as follows (using the new XQuery 4 string template syntax):
`Stopped at { $err:module }, { $err:line-number }/{ $err:column-number }: { $err:description }`
As you’ve already discovered the responsible commit, you may have discovered the new XQuery 4 $err:map variable: It bundles all other error values into a single variable.
And @Martin Honnen thanks for mentioning fn:stack-trace. The function is still under discussion and might be dropped again: The specification gives processors much freedom in optimizing its expressions, so it’s hardly possible to define the function in a way that’s not completely implementation-defined.
Hope this helps, Christian
On Thu, Jan 11, 2024 at 12:52 PM Omar Siam Omar.Siam@oeaw.ac.at wrote:
I think stack traces were removed in this commit from basex-core/src/main/java/org/basex/query/expr/Catch.java
Revision: fc2376f6c9c250babfac7a7161b8a61740878b2b Author: Christian Grün cg@basex.org cg@basex.org Date: 17.05.2023 11:25:01 Message: [XQ4] try/catch, $err:map
Modified: basex-api/src/main/java/org/basex/http/restxq/RestXqFunction.java Modified: basex-core/src/main/java/org/basex/query/QueryParser.java Modified: basex-core/src/main/java/org/basex/query/expr/Catch.java Modified: basex-core/src/test/java/org/basex/query/expr/XQuery4Test.java
line 141 -> 151 qe.getMessage() is now replaced with an Empty.VALUE const.
Am 11.01.2024 um 12:39 schrieb Martin Honnen:
Am 11.01.2024 um 12:37 schrieb Omar Siam Omar.Siam@oeaw.ac.at Omar.Siam@oeaw.ac.at:
I get: Unknown function: fn:stack-trace() when I use stack-trace().
Ah, sorry, it looks like it is not yet implemented. Wait for Christian to give you hopefully some better info than my ill guess.
-- Mag. Ing. Omar Siam Austrian Center for Digital Humanities and Cultural Heritage Österreichische Akademie der Wissenschaften | Austrian Academy of Sciences Stellvertretende Behindertenvertrauensperson | Deputy representative for disabled persons Bäckerstraße 13, 1010 Wien, Österreich | Vienna, Austria T: +43 1 51581-7295omar.siam@oeaw.ac.at | www.oeaw.ac.at/acdh