Exception: AlertMachine::RunTask::AssertionFailure
- Inherits:
-
Exception
- Object
- Exception
- AlertMachine::RunTask::AssertionFailure
- Defined in:
- lib/run_task.rb
Overview
When an assertion fails, this exception is thrown so that we can unwind the stack frame. It’s also deliberately throwing something that’s not derived from Exception.
Instance Attribute Summary collapse
-
#caller ⇒ Object
readonly
Returns the value of attribute caller.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(msg, caller) ⇒ AssertionFailure
constructor
A new instance of AssertionFailure.
- #log ⇒ Object
- #parsed_caller ⇒ Object
Constructor Details
#initialize(msg, caller) ⇒ AssertionFailure
Returns a new instance of AssertionFailure.
101 102 103 104 |
# File 'lib/run_task.rb', line 101 def initialize(msg, caller) @msg, @caller, @time = msg, caller, Time.now super(@msg) end |
Instance Attribute Details
#caller ⇒ Object (readonly)
Returns the value of attribute caller.
100 101 102 |
# File 'lib/run_task.rb', line 100 def caller @caller end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
100 101 102 |
# File 'lib/run_task.rb', line 100 def msg @msg end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
100 101 102 |
# File 'lib/run_task.rb', line 100 def time @time end |