lib/valigator/csv/error.rb in valigator-csv-1.1.3 vs lib/valigator/csv/error.rb in valigator-csv-1.2.0
- old
+ new
@@ -1,7 +1,11 @@
module Valigator
module CSV
+ class UnhandledTypeError < StandardError
+ end
+
+
class Error
attr_reader :row, :type, :message
@@ -75,10 +79,10 @@
when /Unclosed quoted field/
'unclosed_quote'
when /invalid byte sequence/
'invalid_encoding'
else
- raise ArgumentError, 'unknown type'
+ raise UnhandledTypeError, message
end
end
end