Hi Eliot,

Thanks for the pointer that led me to update the documentation:

We returned “something like a stack trace” in a previous version of
BaseX, but the result was often misleading: Functions are inlined and
simplified at compile time, and it’s often not possible to return a
stack trace representation at runtime that reflects function calls of
the original query. This is why we eventually dropped this
information.

During development, though, it can be helpful to assign 0 to the
INLINELIMIT option. This way, function inlining is disabled, and the
returned stack traces (without try/catch) make more sense. However,
queries without inlining may run much slower than standard ones.

Hope this helps,
Christian


On Wed, Jul 12, 2023 at 10:46 PM Eliot Kimber
<eliot.kim...@servicenow.com> wrote:
>
> The docs for Try/Catch in in the XQuery_3.0 page say:
>
>
>
> ·         $err:additional: error stack trace
>
>
>
> However, in my testing, this only returns the place where the error was 
> thrown, not the complete stack trace as is shown e.g., in a web app when an 
> exception is thrown.
>
>
>
> Is it possible to get the stack trace in XQuery? I didn’t find anything 
> searching on the BaseX-supplied DBA app.
>
>
>
> Thanks,
>
>
>
> E.
>
> _____________________________________________
>
> Eliot Kimber
>
> Sr Staff Content Engineer
>
> O: 512 554 9368
>
> M: 512 554 9368
>
> servicenow.com
>
> LinkedIn | Twitter | YouTube | Facebook

Reply via email to