Skip to content

Commit 15253f5

Browse files
committed
[Rails51] AdapterTest#test_numeric_value_out_of_ranges_are_translated_to_specific_exception
1 parent 72f371b commit 15253f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ def translate_exception(e, message)
343343
)
344344
when /Cannot insert the value NULL into column.*does not allow nulls/
345345
NotNullViolation.new(message)
346+
when /Arithmetic overflow error/
347+
RangeError.new(message)
346348
else
347349
super
348350
end

0 commit comments

Comments
 (0)