Exception: TinyTds::Error

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

Constant Summary collapse

SEVERITIES =
[
  {:number => 1,   :severity => 'EXINFO',         :explanation => 'Informational, non-error.'},
  {:number => 2,   :severity => 'EXUSER',         :explanation => 'User error.'},
  {:number => 3,   :severity => 'EXNONFATAL',     :explanation => 'Non-fatal error.'},
  {:number => 4,   :severity => 'EXCONVERSION',   :explanation => 'Error in DB-Library data conversion.'},
  {:number => 5,   :severity => 'EXSERVER',       :explanation => 'The Server has returned an error flag.'},
  {:number => 6,   :severity => 'EXTIME',         :explanation => 'We have exceeded our timeout period while waiting for a response from the Server - the DBPROCESS is still alive.'},
  {:number => 7,   :severity => 'EXPROGRAM',      :explanation => 'Coding error in user program.'},
  {:number => 8,   :severity => 'EXRESOURCE',     :explanation => 'Running out of resources - the DBPROCESS may be dead.'},
  {:number => 9,   :severity => 'EXCOMM',         :explanation => 'Failure in communication with Server - the DBPROCESS is dead.'},
  {:number => 10,  :severity => 'EXFATAL',        :explanation => 'Fatal error - the DBPROCESS is dead.'},
  {:number => 11,  :severity => 'EXCONSISTENCY',  :explanation => 'Internal software error - notify Sybase Technical Support.'}
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Error

Returns a new instance of Error.


20
21
22
23
24
25
# File 'lib/tiny_tds/error.rb', line 20

def initialize(message)
  super
  @severity = nil
  @db_error_number = nil
  @os_error_number = nil
end

Instance Attribute Details

#db_error_numberObject

Returns the value of attribute db_error_number


18
19
20
# File 'lib/tiny_tds/error.rb', line 18

def db_error_number
  @db_error_number
end

#os_error_numberObject

Returns the value of attribute os_error_number


18
19
20
# File 'lib/tiny_tds/error.rb', line 18

def os_error_number
  @os_error_number
end

#severityObject

Returns the value of attribute severity


18
19
20
# File 'lib/tiny_tds/error.rb', line 18

def severity
  @severity
end

#sourceObject

Returns the value of attribute source


18
19
20
# File 'lib/tiny_tds/error.rb', line 18

def source
  @source
end