[Zope] Zope Bug? Exception Handling does not work properly...

Philipp Robbel philipp.robbel@eml.villa-bosch.de
Tue, 5 Jun 2001 16:03:45 +0200


This is a multi-part message in MIME format.

------_=_NextPart_001_01C0EDC8.55CDA41A
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hello everybody,

I am using the following code (as described in the Zope Tutorial) to
handle=20
the BadRequestException which occurs in my example if an image with the
same=20
name already exists in the directory.

<dtml-try>
   <dtml-call "manage_addImage(PicName, attached_file.read(), '')">
<dtml-except BadRequestException>
   An Image with the same name already exists. Please choose a different
one.
</dtml-try>

The problem is that <dtml-except BadRequestException> does not catch the
exception. A <dtml-except> does, however, but that's not what I want.


It would be very nice if someone could help me on that issue,
Thanks in advance,

Philipp Robbel

------_=_NextPart_001_01C0EDC8.55CDA41A
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DWindows-1252">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.4417.0">
<TITLE>Zope Bug? Exception Handling does not work properly...</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>Hello everybody,<BR>
<BR>
I am using the following code (as described in the Zope Tutorial) to =
handle<BR>
the BadRequestException which occurs in my example if an image with the =
same<BR>
name already exists in the directory.<BR>
<BR>
&lt;dtml-try&gt;<BR>
&nbsp;&nbsp; &lt;dtml-call &quot;manage_addImage(PicName, =
attached_file.read(), '')&quot;&gt;<BR>
&lt;dtml-except BadRequestException&gt;<BR>
&nbsp;&nbsp; An Image with the same name already exists. Please choose a =
different one.<BR>
&lt;/dtml-try&gt;<BR>
<BR>
The problem is that &lt;dtml-except BadRequestException&gt; does not =
catch the exception. A &lt;dtml-except&gt; does, however, but that's not =
what I want.<BR>
<BR>
<BR>
It would be very nice if someone could help me on that issue,<BR>
Thanks in advance,<BR>
<BR>
Philipp Robbel</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0EDC8.55CDA41A--