Skip to content

STP.stacktrace not strictly compatible to debug.traceback #11

@devurandom

Description

@devurandom

STP.stacktrace is not strictly compatible to debug.traceback: It returns two values, instead of one. This creates problems in conjunction with varargs functions and those created through the Lua C API (which will happily consume the additional argument, creating an unexpected stack layout).

Is this something you want to fix?

--- a/src/StackTracePlus.lua
+++ b/src/StackTracePlus.lua
@@ -391,7 +392,7 @@ Stack Traceback
                info = dumper.getinfo(level, "nSlf")
        end

-       return dumper:concat_lines(), original_error
+       return dumper:concat_lines()
 end

 --

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions