Sometimes, I do get those errors.

But if I take a working piece of python and stick in a sabotage statement
like:

Var1 = var2

Where var2 is undefined (i.e. has never been assigned anything)

Just silent failure.  No error.

Jon


-----Original Message-----
From: Jonathan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 31, 2007 11:15 AM
To: Jon Emmons; zope@zope.org
Subject: Re: [Zope] Uncaptured python exception


----- Original Message ----- 
From: "Jon Emmons" <[EMAIL PROTECTED]>
To: "'Andreas Jung'" <[EMAIL PROTECTED]>; "'Jonathan'" <[EMAIL PROTECTED]>; 
<zope@zope.org>
Sent: Thursday, May 31, 2007 11:06 AM
Subject: RE: [Zope] Uncaptured python exception


> I still don't know why python errors will just quietly cause things to 
> fail
> with no zope error at all.  Nothing...  That may be something I just have 
> to
> live with.  Very difficult to debug and develop with though.
>
> Syntax errors I can find by simply importing the external method into the
> python interpreter.

Syntax errors for external methods can also be found by clicking on the 
'Save Changes' button of the external method object when in the ZMI.


>  But dealing with the form variables, I will often have
> runtime errors that give no message at all.
>
> So I find myself putting little "I am here" print messaged throughout my
> code to try to zone in on where I mistyped the variable equipment_num as
> equipment_mun.

Referring to non-existent python variables (eg. the mistyping you described 
above) should raise a KeyError.  Do you have any try/except statements in 
your external method which may be capturing the errors?


Jonathan

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to