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

Automatically prying uncaught Rails console errors? #64

Open
suan opened this issue Mar 19, 2014 · 4 comments
Open

Automatically prying uncaught Rails console errors? #64

suan opened this issue Mar 19, 2014 · 4 comments

Comments

@suan
Copy link

suan commented Mar 19, 2014

I've tried many things but an unable to get pry-rescue to automatically pry when there's an uncaught exception in a Rails console. The README also only talks about using it in rails server. Is this just not supported?

@kyrylo
Copy link
Collaborator

kyrylo commented Mar 19, 2014

@banister
Copy link
Collaborator

@kyrylo afaik better_errors does not intercept errors in the rails console

@suan, pry-rescue wont rescue it automatically, but you can enter rails console errors using cd-cause

@suan
Copy link
Author

suan commented Mar 20, 2014

Thanks for the help. It turned out Pry::rescue { <expression> } was what I was looking for (though it's not automatic) Wonder if there's a way to wrap all irb/pry-rails expressions within a block...

@banister
Copy link
Collaborator

Override Pry.config.exception_handler to enter the exception

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

3 participants