Module: AuxiliaryRails::Concerns::Errorable

Extended by:
ActiveSupport::Concern
Included in:
Application::Query, Performable
Defined in:
lib/auxiliary_rails/concerns/errorable.rb

Instance Method Summary collapse

Instance Method Details

#error!(message = nil) ⇒ Object

Raises:

  • (self.class.error_class)


16
17
18
19
# File 'lib/auxiliary_rails/concerns/errorable.rb', line 16

def error!(message = nil)
  message ||= "`#{self.class}` raised error."
  raise self.class.error_class, message
end