Exception: Exception
- Defined in:
- lib/pry-exception_explorer/core_ext.rb
Overview
PryExceptionExplorer monkey-patches to Exception
Constant Summary
- NoContinuation =
Class.new(StandardError)
Instance Attribute Summary (collapse)
-
- (Continuation) continuation
The continuation object for the exception.
-
- (Array<Binding>) exception_call_stack
The array of bindings that represent the call stack for the exception.
-
- (Boolean) should_intercept
(also: #should_intercept?)
Whether this exception should be intercepted.
Instance Method Summary (collapse)
-
- (Object) continue
This method enables us to continue an exception (using
callccinternally).
Instance Attribute Details
- (Continuation) continuation
The continuation object for the exception. Invoking this continuation will allow the program to continue from the point the exception was raised.
8 9 10 |
# File 'lib/pry-exception_explorer/core_ext.rb', line 8 def continuation @continuation end |
- (Array<Binding>) exception_call_stack
The array of bindings that represent the
call stack for the exception. This is navigable inside the Pry
session with the up and down and frame commands.
13 14 15 |
# File 'lib/pry-exception_explorer/core_ext.rb', line 13 def exception_call_stack @exception_call_stack end |
- (Boolean) should_intercept Also known as: should_intercept?
Whether this exception should be intercepted. (Only relevant for wrapped exceptions).
17 18 19 |
# File 'lib/pry-exception_explorer/core_ext.rb', line 17 def should_intercept @should_intercept end |
Instance Method Details
- (Object) continue
This method enables us to continue an exception (using
callcc internally)
21 22 23 24 |
# File 'lib/pry-exception_explorer/core_ext.rb', line 21 def continue raise NoContinuation unless continuation.respond_to?(:call) continuation.call end |