Exception: Mail::Field::ParseError

Inherits:
FieldError
  • Object
show all
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

IncompleteParseError, NilParseError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element, value, reason) ⇒ ParseError

Returns a new instance of ParseError.


83
84
85
86
87
88
# File 'lib/mail/field.rb', line 83

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

#elementObject

:nodoc:


81
82
83
# File 'lib/mail/field.rb', line 81

def element
  @element
end

#reasonObject

:nodoc:


81
82
83
# File 'lib/mail/field.rb', line 81

def reason
  @reason
end

#valueObject

:nodoc:


81
82
83
# File 'lib/mail/field.rb', line 81

def value
  @value
end