Exception: Mail::Field::ParseError
- Inherits:
-
FieldError
- Object
- StandardError
- FieldError
- Mail::Field::ParseError
- Defined in:
- lib/mail/field.rb
Overview
Raised when a parsing error has occurred (ie, a StructuredField has tried to parse a field that is invalid or improperly written)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#element ⇒ Object
:nodoc:.
-
#reason ⇒ Object
:nodoc:.
-
#value ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#initialize(element, value, reason) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(element, value, reason) ⇒ ParseError
Returns a new instance of ParseError.
111 112 113 114 115 116 |
# File 'lib/mail/field.rb', line 111 def initialize(element, value, reason) @element = element @value = to_utf8(value) @reason = to_utf8(reason) super("#{@element} can not parse |#{@value}|: #{@reason}") end |
Instance Attribute Details
#element ⇒ Object
:nodoc:
109 110 111 |
# File 'lib/mail/field.rb', line 109 def element @element end |
#reason ⇒ Object
:nodoc:
109 110 111 |
# File 'lib/mail/field.rb', line 109 def reason @reason end |
#value ⇒ Object
:nodoc:
109 110 111 |
# File 'lib/mail/field.rb', line 109 def value @value end |