Skip to content

Commit

Permalink
nicen up the error message for bad encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Nelson authored and nathansobo committed Jun 28, 2010
1 parent ef84f9f commit 8c1f27f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/lib/monarch/model/tuples/record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ def validate_wire_representation
fields.each do |field|
begin
field.value_wire_representation.to_json
rescue JSON::GeneratorError
validation_error(field.name, "text contains one or more illegal (non-unicode) characters")
rescue => e
validation_error(field.name, e.message)
validation_error(field.name, "unexpected error: #{e}")
end
end
end
Expand Down

0 comments on commit 8c1f27f

Please sign in to comment.