class Net::TTI::Exceptions::ErrorMessageReceived

Constants

ERROR_REGEX
ERROR_REGEX_INDEX_CODE
ERROR_REGEX_INDEX_DESCRIPTION

Public Instance Methods

error_code() click to toggle source

Attempts to parse and return the “ORA-xxxxx” error code from the error message @return [Integer] A numeric error code, or nil if the code could not be determined

# File lib/net/tti/exceptions.rb, line 39
def error_code()
  matches = ERROR_REGEX.match( self.message )
  error_code = matches[ERROR_REGEX_INDEX_CODE] unless( matches.nil? or matches[ERROR_REGEX_INDEX_CODE].nil? )
  error_code = error_code.to_i unless error_code.nil?
  return error_code
end
error_description() click to toggle source

Attempts to parse and return the error description after the “ORA-xxxxx” error code in the error message @return [String] A string containing the error description, or nil if the description could not be determined

# File lib/net/tti/exceptions.rb, line 50
def error_description()
  matches = ERROR_REGEX.match( self.message )
  return matches[ERROR_REGEX_INDEX_DESCRIPTION] unless( matches.nil? or matches[ERROR_REGEX_INDEX_DESCRIPTION].nil? )
end