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.



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

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.



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

def code
  @code
end

#dataObject

Returns the value of attribute data.



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

def data
  @data
end

Instance Method Details

#to_sObject



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

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