Exception: Foobara::CommandConnector::NotFoundError
- Inherits:
-
CommandConnectorError
- Object
- StandardError
- Error
- RuntimeError
- CommandConnectorError
- Foobara::CommandConnector::NotFoundError
- Defined in:
- foobara-0.0.110/projects/command_connectors/src/command_connector/not_found_error.rb
Direct Known Subclasses
NoCommandFoundError, NoCommandOrTypeFoundError, NoTypeFoundError
Instance Attribute Summary
Attributes inherited from Error
#backtrace_when_initialized, #backtrace_when_raised, #context, #error_key, #is_fatal, #message
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message: nil, context: nil) ⇒ NotFoundError
constructor
A new instance of NotFoundError.
Methods inherited from RuntimeError
Methods inherited from Error
#==, abstract, abstract?, category, context, #eql?, fatal?, #fatal?, foobara_manifest, #key, message, path, #prepend_path!, runtime_path, subclass, symbol, to_h, #to_h, types_depended_on
Methods included from Foobara::Concern
foobara_class_methods_module_for, foobara_concern?, included
Constructor Details
#initialize(message: nil, context: nil) ⇒ NotFoundError
Returns a new instance of NotFoundError.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/not_found_error.rb', line 18 def initialize(message: nil, context: nil, **) if context not_found = context[:not_found] ||= "Not found: #{not_found}" else context = {} ||= "Not found" end super end |
Class Method Details
.for(not_found) ⇒ Object
7 8 9 10 11 12 13 |
# File 'foobara-0.0.110/projects/command_connectors/src/command_connector/not_found_error.rb', line 7 def for(not_found) if not_found new(context: { not_found: }, message: "Not found: #{not_found}") else new end end |