Exception: Badgeville::BadgevilleError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(err_code = nil, error_data = "") ⇒ BadgevilleError

Returns a new instance of BadgevilleError.



16
17
18
19
20
# File 'lib/badgeville.rb', line 16

def initialize (err_code=nil, error_data="")
  super error_data.to_s
  @data = error_data
  @code = err_code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



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

def code
  @code
end

#dataObject

Returns the value of attribute data.



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

def data
  @data
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/badgeville.rb', line 22

def to_s
  "ERROR #{@code} : #{@data}"
end