Skip to content

finally doesn't rethrow the stacktrace #27484

Closed

Description

julia> corrupt_stacktrace() = error("destroy stacktrace")

julia> f() = error("expected")
f (generic function with 1 method)

julia> try
        f()
       finally
        try; corrupt_stacktrace(); end
       end
ERROR: 
Stacktrace:
 [1] error at ./error.jl:33 [inlined]
 [2] corrupt_stacktrace at ./REPL[8]:1 [inlined] # should have been f!
 [3] macro expansion at ./REPL[14]:4 [inlined]
 [4] top-level scope at ./<missing>:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorerror handlingHandling of exceptions by Julia or the user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions