Class: Contracts::Nothrows

Inherits:
Base
  • Object
show all
Defined in:
lib/contracts.rb

Instance Attribute Summary

Attributes inherited from Base

#method

Instance Method Summary collapse

Methods inherited from Base

#+@, #method_name

Instance Method Details

#on_exception(rv, method, receiver, *args, &blk) ⇒ Object

Raises:



188
189
190
# File 'lib/contracts.rb', line 188

def on_exception(rv, method, receiver, *args, &blk)
  raise Contracts::Error, "Nothrow method `#{method_name}` raised exception: #{$!}", caller[5..-1]
end