Permalink
Browse files

Add error message if can not parse a field

  • Loading branch information...
1 parent ab2347e commit 1cdcb26135cd5fc58f3b5d505739a40886d023d8 @mikel committed Nov 18, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/mail/field.rb
View
@@ -187,6 +187,7 @@ def create_field(name, value, charset)
begin
self.field = new_field(name, value, charset)
rescue Mail::Field::ParseError => e
+ STDERR.puts "Could not parse field #{name} with value #{value} got error #{e}"
self.field = Mail::UnstructuredField.new(name, value)
self.field.errors << [name, value, e]
self.field

0 comments on commit 1cdcb26

Please sign in to comment.