M
Mandeep Baruah
I am trying to rescue exceptions from a PostgreSQL query (see bellow
code)
---------------------------------------------------
begin
res = @pgconn.exec(querystring) # some query
rescue Postgres:GError => e
puts "Error code: #{e.err}"
puts "Error message: #{e.errstr}"
end
---------------------------------------------------
(I know that the query I am tring to execute will give an exception)
But when I try to execute, it give me an error saying:
"dependencies.rb:493:in `const_missing': uninitialized constant
UpdateTestlinkDB:ostgres (NameError)"
Is there a different way to handle exception or, am I missing something?
code)
---------------------------------------------------
begin
res = @pgconn.exec(querystring) # some query
rescue Postgres:GError => e
puts "Error code: #{e.err}"
puts "Error message: #{e.errstr}"
end
---------------------------------------------------
(I know that the query I am tring to execute will give an exception)
But when I try to execute, it give me an error saying:
"dependencies.rb:493:in `const_missing': uninitialized constant
UpdateTestlinkDB:ostgres (NameError)"
Is there a different way to handle exception or, am I missing something?