Exception: ErrorHandler::Error

Inherits:
StandardError
  • Object
show all
Includes:
Sms
Defined in:
lib/smsruby/error.rb

Overview

The Error class represent the error layer. Inherit from standard error class of ruby and allows to give a more specific description about produced errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Error

Initialize all attributes for error class receiving the id error. The printError function of the shared object is used to obtain the string message of the current error



21
22
23
24
# File 'lib/smsruby/error.rb', line 21

def initialize(id)
  @id = id
  @message = printError(id)
end

Instance Attribute Details

#idObject (readonly)

Reference the id of the current error



12
13
14
# File 'lib/smsruby/error.rb', line 12

def id
  @id
end

#messageObject (readonly)

Reference a string message description of the current error



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

def message
  @message
end