Skip to content

Commit

Permalink
Limit expected set of exceptions from Time.parse
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Jul 16, 2023
1 parent 7b0e505 commit 654777f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/happymapper/supported_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def apply(value)

register_type Time do |value|
Time.parse(value.to_s)
rescue StandardError
rescue ArgumentError
Time.at(value.to_i)
end

Expand Down

0 comments on commit 654777f

Please sign in to comment.