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)

Create error exception.



855
856
857
858
# File 'lib/como.rb', line 855

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

Instance Attribute Details

- (Object) data (readonly)

Exception data.



852
853
854
# File 'lib/como.rb', line 852

def data
  @data
end