Comments (3)
+1
from pry-rescue.
Isn't your example missing wrapping the test call with Pry.rescue
?
e.g.
��Frame number:�� 0/0
��From:�� /home/jason/Code/scratch/pry-rescue-test.rb:10 :
5: raise 'foo'
6: rescue => e
7: raise 'bar'
8: end
9:
=> 10: binding.pry
[1] pry(main)> Pry.rescue { test }
��Frame number:�� 0/18
��Frame type:�� rescue
��From:�� /home/jason/Code/scratch/pry-rescue-test.rb:7 Object#test:
4: def test
5: raise 'foo'
6: rescue => e
=> 7: raise 'bar'
8: end
RuntimeError: bar
from pry-rescue-test.rb:7:in `rescue in test'
Caused by RuntimeError: foo
from pry-rescue-test.rb:5:in `test'
[1] pry(main)> try-again
��Frame number:�� 0/18
��Frame type:�� rescue
��From:�� /home/jason/Code/scratch/pry-rescue-test.rb:7 Object#test:
4: def test
5: raise 'foo'
6: rescue => e
=> 7: raise 'bar'
8: end
RuntimeError: bar
from pry-rescue-test.rb:7:in `rescue in test'
Caused by RuntimeError: foo
from pry-rescue-test.rb:5:in `test'
[1] pry(main)>
from pry-rescue.
Yes, you are right, thank you.
from pry-rescue.
Related Issues (20)
- Not working when ActionController::RoutingError raises.
- after capybara example is rescued page has been reset HOT 4
- How to debug your code not RSpec?? HOT 2
- raises "Hook with name 'enable_rescuing' already defined!" in ruby 2.5.x HOT 1
- More elegant solution to loading pry-rescue via pryrc?
- could not work with unit test
- #<NoMethodError: private method `eval' called for nil:NilClass>
- Bug: doesn't work with `rails runner` HOT 1
- "skip" command
- peeking feature not works with pry 0.14.1 on ruby 3.0.0
- Pry-Rescue stops on `enter_exception_context` instead of the actual error HOT 4
- Ruby 3.2 incompatibility due to removal of File.exists? alias HOT 1
- Capybara monkey patch causes raise_server_errors to be evaluated at the wrong time
- is v1.6.0 real? HOT 1
- NoMethodError: undefined method `[]' for nil:NilClass HOT 1
- Continue command ? HOT 2
- [feature request] display minitest test name in debugger
- How to use with rspec? HOT 5
- Global rescue triggers after transactional fixture has rolled back (Rspec, ...) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pry-rescue.