Module: ROM::SQL::Commands::ErrorWrapper Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Shared error handler for all SQL commands
Instance Method Summary collapse
-
#call(*args) ⇒ Object
(also: #[])
Handle Sequel errors and re-raise ROM-specific errors.
Instance Method Details
#call(*args) ⇒ Object Also known as: []
Handle Sequel errors and re-raise ROM-specific errors
11 12 13 14 15 |
# File 'lib/rom/sql/commands/error_wrapper.rb', line 11 def call(*args) super rescue *ERROR_MAP.keys => e raise ERROR_MAP.fetch(e.class, Error), e end |