Exception: Saxon::ItemType::LexicalStringConversion::Errors::RubyValueOutOfBounds
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Saxon::ItemType::LexicalStringConversion::Errors::RubyValueOutOfBounds
- Defined in:
- lib/saxon/item_type/lexical_string_conversion.rb
Overview
Raised during conversion from Ruby value to XDM type lexical string when the ruby value fits the Type’s string representation, but is out of the permitted bounds for the type, for instance an integer bigger than 32767
for the type xs:short
Instance Attribute Summary collapse
-
#item_type ⇒ Object
readonly
Returns the value of attribute item_type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, item_type) ⇒ RubyValueOutOfBounds
constructor
A new instance of RubyValueOutOfBounds.
-
#to_s ⇒ Object
error message includes Ruby value and the XDM type whose bounds it is outside of.
Constructor Details
#initialize(value, item_type) ⇒ RubyValueOutOfBounds
Returns a new instance of RubyValueOutOfBounds.
521 522 523 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 521 def initialize(value, item_type) @value, @item_type = value, item_type end |
Instance Attribute Details
#item_type ⇒ Object (readonly)
Returns the value of attribute item_type.
519 520 521 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 519 def item_type @item_type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
519 520 521 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 519 def value @value end |
Instance Method Details
#to_s ⇒ Object
error message includes Ruby value and the XDM type whose bounds it is outside of
526 527 528 |
# File 'lib/saxon/item_type/lexical_string_conversion.rb', line 526 def to_s "Ruby value #{value.inspect} is outside the allowed bounds of an XDM #{item_type.type_name.to_s}" end |