Exception: Rightnow::Error

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

Direct Known Subclasses

JsonParseError

Instance Method Summary collapse

Constructor Details

#initialize(msg, code = nil) ⇒ Error

Returns a new instance of Error.



3
4
5
6
# File 'lib/rightnow/error.rb', line 3

def initialize msg, code = nil
  super msg
  @code = code
end

Instance Method Details

#to_sObject



8
9
10
# File 'lib/rightnow/error.rb', line 8

def to_s
  super + (@code.nil? ? '' : " (#{@code})")
end