Module: ROM::SQL::Commands::ErrorWrapper

Included in:
Create, Delete, Update
Defined in:
lib/rom/sql/commands/error_wrapper.rb

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rom/sql/commands/error_wrapper.rb', line 5

def call(*args)
  super
rescue *ERRORS => e
  raise ConstraintError, e.message
rescue Sequel::DatabaseError => e
  raise DatabaseError.new(e, e.message)
end