pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Denis Gasparin <denis@edinet.it>
To: pgsql-interfaces@postgresql.org
Subject: PyGreSQL pg.error Exception
Date: Tue, 03 Jul 2001 10:33:23 +0200
Message-ID: <5.1.0.14.0.20010703102711.00ad9d10@10.1.1.2> (raw)

Hi to all!
         In the documentation of the PyGreSQL module it is said that a 
pg.error exception is thrown when pg.connect or other pg functions cause an 
error. How can i get the value of the error? I have tried print pg.error in 
the except clause but i get only a _pg.error value...

For example:
try:
         db = pg.connect( connection parameters);
except pg.error:
         print pg.error;

This prints "_pg.error"...

Thanks in advance for your replies,

Denis





view thread (2+ messages)  latest in thread

Message-ID: <5.1.0.14.0.20010703102711.00ad9d10@10.1.1.2>
Permalink:  ../5.1.0.14.0.20010703102711.00ad9d10@10.1.1.2/
Also on:    postgresql.org/message-id/5.1.0.14.0.20010703102711.00ad9d10@10.1.1.2

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: denis@edinet.it
  Subject: Re: PyGreSQL pg.error Exception
  In-Reply-To: <5.1.0.14.0.20010703102711.00ad9d10@10.1.1.2>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox