Exception: JIJI::AbstractError

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

Direct Known Subclasses

FatalError, UserError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message = "", info = {}) ⇒ AbstractError

Returns a new instance of AbstractError.



5
6
7
8
9
# File 'lib/jiji/error.rb', line 5

def initialize( code, message="", info={}  )
  super( message )
  @code = code
  @info = info
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/jiji/error.rb', line 13

def code
  @code
end

#infoObject

Returns the value of attribute info.



14
15
16
# File 'lib/jiji/error.rb', line 14

def info
  @info
end

Instance Method Details

#detailObject



10
11
12
# File 'lib/jiji/error.rb', line 10

def detail
  {"code"=>@code,"info"=>@info}
end