Class: QRAPI::ErrorMapping

Inherits:
Object
  • Object
show all
Includes:
Kartograph::DSL
Defined in:
lib/qrapi/mappings/error_mapping.rb

Defined Under Namespace

Classes: Error

Class Method Summary collapse

Class Method Details

.fail_with(klass, content) ⇒ Object

Raises:

  • (klass)


14
15
16
17
# File 'lib/qrapi/mappings/error_mapping.rb', line 14

def self.fail_with(klass, content)
  error = extract_single(content, :read)
  raise klass, error.message
end