From: Mandeep Baruah Date: 2008-11-19T18:13:07+09:00 Subject: "rescue Postgres::PGError" not working I am trying to rescue exceptions from a PostgreSQL query (see bellow code) --------------------------------------------------- begin res = @pgconn.exec(querystring) # some query rescue Postgres::PGError => 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::Postgres (NameError)" Is there a different way to handle exception or, am I missing something? -- Posted via http://www.ruby-forum.com/.