[Zope] Except Bad Request

Small Business Services toolkit at magma.ca
Tue Jun 8 19:30:25 EDT 2004


<snip>
From: hawelek_tlen
I want to catch Exception Bad Request,

try:
 container.manage_addZOracleConnection(id_con,'',str_con,check=1,
REQUEST=None)
except:
 return "ERROR"
else:
 return id_con

in Handling Exception I want to catch Exception Bad Request, I get this
message always when I try to add new connection, that already exist,
this code above catch all Exception unfortunatelly,
</snip>

You need to include the error condition that you want to trap in the
'except' statement:

eg

try:
   some code

except ValueError:
   handle value error

except IOError:
   handle io error

except:
  handle all other errors



HTH

Jonathan





More information about the Zope mailing list