Exception: IONIS::Exception::Exception

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/ionisexceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, reason) ⇒ Exception

Returns a new instance of Exception.



6
7
8
9
# File 'lib/ionisexceptions.rb', line 6

def initialize(code, reason)
  @code, @reason = code, reason
  super "#{reason} (#{code})"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/ionisexceptions.rb', line 4

def code
  @code
end

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/ionisexceptions.rb', line 4

def reason
  @reason
end