Exception: Mail::Field::ParseError

Inherits:
FieldError 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)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element, value, reason) ⇒ ParseError

Returns a new instance of ParseError.



47
48
49
50
51
52
# File 'lib/mail/field.rb', line 47

def initialize(element, value, reason)
  @element = element
  @value = value
  @reason = reason
  super("#{element} can not parse |#{value}|\nReason was: #{reason}")
end

Instance Attribute Details

#elementObject

:nodoc:



45
46
47
# File 'lib/mail/field.rb', line 45

def element
  @element
end

#reasonObject

:nodoc:



45
46
47
# File 'lib/mail/field.rb', line 45

def reason
  @reason
end

#valueObject

:nodoc:



45
46
47
# File 'lib/mail/field.rb', line 45

def value
  @value
end