Class: ODBC::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/marjoree/odbc.rb

Instance Method Summary collapse

Instance Method Details

#error_codeObject



34
35
36
37
38
39
# File 'lib/marjoree/odbc.rb', line 34

def error_code
  start_index = to_s =~ /(\()/
  end_index = to_s =~ /(\))/
  end_index -= 1
  return to_s.slice( (start_index + 1 ), (end_index - start_index ) ).to_i
end

#error_messageObject



41
42
43
# File 'lib/marjoree/odbc.rb', line 41

def error_message
  return to_s.split( /\]/ ).last.rstrip
end