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) ⇒ Hash+
(also: #[])
Handle Sequel errors and re-raise ROM-specific errors.
Instance Method Details
#call(*args) ⇒ Hash+ Also known as: []
Handle Sequel errors and re-raise ROM-specific errors
15 16 17 18 19 |
# File 'lib/rom/sql/commands/error_wrapper.rb', line 15 def call(*args) super rescue *ERROR_MAP.keys => e raise ERROR_MAP.fetch(e.class, Error), e end |