Skip to content

Commit f24d4e9

Browse files
authored
Add note that xpcall err handler preserves trace
1 parent 18eef33 commit f24d4e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

content/en-us/reference/engine/globals/LuaGlobals.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,10 @@ functions:
756756
succeeds without errors. In this case, `xpcall()` also returns all results
757757
from the call, after this first result. In case of any error, `xpcall()`
758758
returns false plus the result from `err`.
759+
760+
Unlike `Global.LuaGlobals.pcall`, the `err` function preserves the stack
761+
trace of function `f`, which can be inspected using `Library.debug.info()`
762+
or `Library.debug.traceback()`.
759763
parameters:
760764
- name: f
761765
type: function

0 commit comments

Comments
 (0)