Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested API addition: @infiltry #115

Closed
fredcallaway opened this issue Apr 4, 2024 · 1 comment
Closed

Suggested API addition: @infiltry #115

fredcallaway opened this issue Apr 4, 2024 · 1 comment

Comments

@fredcallaway
Copy link
Contributor

fredcallaway commented Apr 4, 2024

I find this macro to be very useful, maybe worth adding to the package?

Saves a lot of time over manually writing out the try block while debugging.

macro infiltry(ex)
    return quote
        try
            $(esc(ex))
        catch
            $(Infiltrator.start_prompt)($(__module__), Base.@locals, $(String(__source__.file)), $(__source__.line))
        end
    end
end
@pfitzseb
Copy link
Member

pfitzseb commented Apr 5, 2024

Sure, looks good. Not sure I like the name overmuch, but can't think of a better alternative. Wanna open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants