Class: DropletKit::ErrorMapping

Inherits:
Object
  • Object
show all
Includes:
Kartograph::DSL
Defined in:
lib/droplet_kit/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/droplet_kit/mappings/error_mapping.rb', line 14

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