Exception: Toys::ContextualError
- Inherits:
-
StandardError
- Object
- StandardError
- Toys::ContextualError
- Defined in:
- lib/toys/errors.rb
Overview
A wrapper exception used to provide user-oriented context for an error thrown during tool execution.
Instance Attribute Summary collapse
-
#banner ⇒ String
readonly
An overall banner message.
-
#config_line ⇒ Integer
readonly
The line number in the toys config file in which the error was detected.
-
#config_path ⇒ String
readonly
The path to the toys config file in which the error was detected.
-
#tool_args ⇒ Array<String>
readonly
The arguments passed to the tool that was running when the error occurred.
-
#tool_name ⇒ Array<String>
readonly
The full name of the tool that was running when the error occurred.
-
#underlying_error ⇒ ::StandardError
readonly
The underlying exception.
Instance Attribute Details
#banner ⇒ String (readonly)
An overall banner message
78 79 80 |
# File 'lib/toys/errors.rb', line 78 def @banner end |
#config_line ⇒ Integer
The line number in the toys config file in which the error was detected
90 91 92 |
# File 'lib/toys/errors.rb', line 90 def config_line @config_line end |
#config_path ⇒ String
The path to the toys config file in which the error was detected
84 85 86 |
# File 'lib/toys/errors.rb', line 84 def config_path @config_path end |
#tool_args ⇒ Array<String>
The arguments passed to the tool that was running when the error occurred
102 103 104 |
# File 'lib/toys/errors.rb', line 102 def tool_args @tool_args end |
#tool_name ⇒ Array<String>
The full name of the tool that was running when the error occurred
96 97 98 |
# File 'lib/toys/errors.rb', line 96 def tool_name @tool_name end |
#underlying_error ⇒ ::StandardError (readonly)
The underlying exception.
Generally the same as Exception#cause.
72 73 74 |
# File 'lib/toys/errors.rb', line 72 def @underlying_error end |