Exception: Moxml::XPath::FunctionError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Moxml::XPathError
- Error
- Moxml::XPath::FunctionError
- Defined in:
- lib/moxml/xpath/errors.rb
Overview
Error raised when an XPath function is not found or invalid
Instance Attribute Summary collapse
-
#argument_count ⇒ Object
readonly
Returns the value of attribute argument_count.
-
#function_name ⇒ Object
readonly
Returns the value of attribute function_name.
Attributes inherited from Moxml::XPathError
Instance Method Summary collapse
-
#initialize(message, expression: nil, function_name: nil, argument_count: nil) ⇒ FunctionError
constructor
A new instance of FunctionError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, expression: nil, function_name: nil, argument_count: nil) ⇒ FunctionError
Returns a new instance of FunctionError.
49 50 51 52 53 54 |
# File 'lib/moxml/xpath/errors.rb', line 49 def initialize(, expression: nil, function_name: nil, argument_count: nil) @function_name = function_name @argument_count = argument_count super(, expression: expression) end |
Instance Attribute Details
#argument_count ⇒ Object (readonly)
Returns the value of attribute argument_count.
47 48 49 |
# File 'lib/moxml/xpath/errors.rb', line 47 def argument_count @argument_count end |
#function_name ⇒ Object (readonly)
Returns the value of attribute function_name.
47 48 49 |
# File 'lib/moxml/xpath/errors.rb', line 47 def function_name @function_name end |
Instance Method Details
#to_s ⇒ Object
56 57 58 59 60 61 |
# File 'lib/moxml/xpath/errors.rb', line 56 def to_s msg = super msg += "\n Function: #{@function_name}" if @function_name msg += "\n Arguments: #{@argument_count}" if @argument_count msg end |