Andy McKay writes:
Using ZODBC Database Adapter to connect to an MSSQL and I can call the sql method in dtml eg:
<dtml-try> <dtml-call "SQL_add_user(REQUEST)"> <dtml-except sql.error> Error! </dtml-try>
But does anyone know a way of trapping the specific error eg: database down, key violation etc...? Or do I have to hack ZODBC to return different errors? You know the "error_value" variable defined inside the "dtml-except"?
Maybe, it can give you additional information about the kind of error. If it is the wrong one, reraise the exception. Dieter
Of course, thank you. That works just fine. ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Andy McKay" <andym@activestate.com> Cc: <zope@zope.org> Sent: Friday, September 29, 2000 2:55 PM Subject: Re: [Zope] SQL errors
Andy McKay writes:
Using ZODBC Database Adapter to connect to an MSSQL and I can call the sql method in dtml eg:
<dtml-try> <dtml-call "SQL_add_user(REQUEST)"> <dtml-except sql.error> Error! </dtml-try>
But does anyone know a way of trapping the specific error eg: database down, key violation etc...? Or do I have to hack ZODBC to return different errors? You know the "error_value" variable defined inside the "dtml-except"?
Maybe, it can give you additional information about the kind of error. If it is the wrong one, reraise the exception.
Dieter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
http://www.zope.com/Members/BwanaZulia/ZUBB With the help of Jeffrey and Angel here is 0.6.0 Changes in Version 0.6.0 Fixed the problem (again) with 2.2.2 (submitted by Angel Garcia) Added message count to the main view (submitted by Jeffrey Harris) Added last post to main view (submitted by Jeffrey Harris) Modified thread view so it will show entire thread (Submitted by Jeffrey Harris) Modified both README and header of ZDiscussions.py Upgraded status to STABLE from DEVELOPMENT as it has now been in production on five of my sites with no problems. Example Sites: http://www.zope.org/Members/BwanaZulia/ZUBB/EXAMPLES Report bugs and such to: http://www.bwanazulia.com/discussions/test/ If you have a ZUBB/ZDiscussion installation and would like to be added to the list please let me know. Thanks, J
participants (3)
-
Andy McKay -
Dieter Maurer -
J. Atwood