Exception: Saxon::XPath::VariableDeclarationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/saxon/xpath/variable_declaration.rb

Overview

Raised when an attempt to declare a variable is made using an occurrence indicator that does not exist

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keys) ⇒ VariableDeclarationError

Returns a new instance of VariableDeclarationError.



58
59
60
# File 'lib/saxon/xpath/variable_declaration.rb', line 58

def initialize(keys)
  @keys = keys
end

Instance Attribute Details

#keysObject (readonly)

Returns the value of attribute keys.



56
57
58
# File 'lib/saxon/xpath/variable_declaration.rb', line 56

def keys
  @keys
end

Instance Method Details

#to_sObject

reports allowable occurrence indicator keys and what was actually passed in



63
64
65
# File 'lib/saxon/xpath/variable_declaration.rb', line 63

def to_s
  "requires :qname, and optionally one of #{Saxon::OccurrenceIndicator.indicator_names}, was passed #{keys.join(', ')}"
end