Exception: Como::Opt::ErrorWithData

Inherits:
StandardError
  • Object
show all
Defined in:
lib/como.rb

Overview

Create exception with capability to pass arbitrary data.

Direct Known Subclasses

InvalidOption, MissingArgument

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, data = nil) ⇒ ErrorWithData

Create error exception.



969
970
971
972
# File 'lib/como.rb', line 969

def initialize( message = nil, data = nil )
    super( message )
    @data = data
end

Instance Attribute Details

#dataObject (readonly)

Exception data.



966
967
968
# File 'lib/como.rb', line 966

def data
  @data
end