Exception: MuaraiCaptcha::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/muaraicaptcha.rb

Overview

Raised when the API returns a non-zero errorId.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, description) ⇒ ApiError

Returns a new instance of ApiError.



30
31
32
33
34
# File 'lib/muaraicaptcha.rb', line 30

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



28
29
30
# File 'lib/muaraicaptcha.rb', line 28

def code
  @code
end

#descriptionObject (readonly)

Returns the value of attribute description.



28
29
30
# File 'lib/muaraicaptcha.rb', line 28

def description
  @description
end