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

- (ErrorWithData) initialize(message = nil, data = nil)

A new instance of ErrorWithData



698
699
700
701
# File 'lib/como.rb', line 698

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

Instance Attribute Details

- (Object) data (readonly)

Returns the value of attribute data



697
698
699
# File 'lib/como.rb', line 697

def data
  @data
end