Exception: Msf::Modules::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Msf::Modules::Error
- Defined in:
- lib/msf/core/modules/error.rb
Overview
Base error class for all error under Msf::Modules
Instance Attribute Summary collapse
-
#module_path ⇒ Object
readonly
Returns the value of attribute module_path.
-
#module_reference_name ⇒ Object
readonly
Returns the value of attribute module_reference_name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(attributes = {}) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/msf/core/modules/error.rb', line 4 def initialize(attributes={}) @module_path = attributes[:module_path] @module_reference_name = attributes[:module_reference_name] = [] << "Failed to load module" if module_reference_name or module_path clause_parts = [] if module_reference_name clause_parts << module_reference_name end if module_path clause_parts << "from #{module_path}" end clause = clause_parts.join(' ') << "(#{clause})" end = attributes[:causal_message] if << "due to #{}" end = .join(' ') super() end |
Instance Attribute Details
#module_path ⇒ Object (readonly)
Returns the value of attribute module_path.
38 39 40 |
# File 'lib/msf/core/modules/error.rb', line 38 def module_path @module_path end |
#module_reference_name ⇒ Object (readonly)
Returns the value of attribute module_reference_name.
37 38 39 |
# File 'lib/msf/core/modules/error.rb', line 37 def module_reference_name @module_reference_name end |