class Mail::Field::ParseError

:nodoc:
to parse a field that is invalid or improperly written)
Raised when a parsing error has occurred (ie, a StructuredField has tried

def initialize(element, value, reason)

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

def to_utf8(text)

def to_utf8(text)
  if text.respond_to?(:force_encoding)
    text.dup.force_encoding(Encoding::UTF_8)
  else
    text
  end
end