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

- (ParseError) initialize(element, value, reason)



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

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

Instance Attribute Details

- (Object) element

:nodoc:



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

def element
  @element
end

- (Object) reason

:nodoc:



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

def reason
  @reason
end

- (Object) value

:nodoc:



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

def value
  @value
end