Exception: Dynectastic::DynectError

Inherits:
Exception
  • Object
show all
Defined in:
lib/dynectastic/errors.rb

Direct Known Subclasses

AuthenticationError, SessionBusy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, source, code) ⇒ DynectError

Returns a new instance of DynectError.



7
8
9
# File 'lib/dynectastic/errors.rb', line 7

def initialize(text, source, code)
  @text, @source, @code = text, source, code      
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/dynectastic/errors.rb', line 5

def code
  @code
end

#sourceObject (readonly)

Returns the value of attribute source.



5
6
7
# File 'lib/dynectastic/errors.rb', line 5

def source
  @source
end

#textObject (readonly)

Returns the value of attribute text.



5
6
7
# File 'lib/dynectastic/errors.rb', line 5

def text
  @text
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/dynectastic/errors.rb', line 11

def message
  %Q[#{ text }. (SOURCE: #{ source}; CODE: #{ code })]
end