<HEAD><TITLE>discuss@charon: [795] in "Coldmud discussion meeting"</TITLE>
<H1>[795] in Coldmud discussion meeting</H1></HEAD>
<A HREF="/"><IMG SRC="/i-d.gif" ALT="root"></A>
<A HREF="?795"><IMG SRC="/i-back.gif" ALT="meeting"></A>
<A HREF="/help.html"><IMG SRC="/i-help.gif" ALT="help"></A>
<A HREF="1"><IMG SRC="/i-first.gif" ALT="first"></A>
<A HREF="790"><IMG SRC="/i-fref.gif" ALT="first in chain"></A>
<A HREF="794"><IMG SRC="/i-pref.gif" ALT="previous in chain"></A>
<A HREF="794"><IMG SRC="/i-prev.gif" ALT="previous"></A>
<A HREF="796"><IMG SRC="/i-next.gif" ALT="next"></A>
<A HREF="796"><IMG SRC="/i-nref.gif" ALT="next in chain"></A>
<A HREF="797"><IMG SRC="/i-lref.gif" ALT="last in chain"></A>
<A HREF="1641"><IMG SRC="/i-last.gif" ALT="last"></A>
<HR><H2>Re: exception handling...</H2>
<H3>daemon@ATHENA.MIT.EDU (Thu Aug 31 19:07:46 1995
)</H3>
<PRE>
Date: Thu, 31 Aug 1995 18:56:25 -0400 (EDT)
From: James C Deikun &lt;jcdst10+@pitt.edu&gt;
To: 869683 Gillespie Brandon James &lt;brandon@smithfield.declab.usu.edu&gt;
Cc: coldstuff@MIT.EDU
In-Reply-To: &lt;9508312224.AA04443@smithfield.declab.usu.edu&gt;



On Thu, 31 Aug 1995, 869683 Gillespie Brandon James wrote:

&gt; &lt; This isn't an exception handler, it's a switch statement.
&gt; 
&gt; No, it is both.  Yes, I'm aware of its similarity with a switch statement,
&gt; but it is cleaner and more succinct than the current method, in conjunction
&gt; with a switch, ala:

[deletia]

Hm, you seem to be missing my point.  Why do this:

&gt; for obj in (list) {
&gt;     catch { 
&gt;         obj.query_test();
&gt;     } handle ~locked {
&gt;         sender().print("Object is locked.");
&gt;     } handle others {
&gt;         sender().print("Error: " + toliteral(error) + " encountered!");
&gt;     } finally {
&gt;         sender().print("Test is sucessful for: " + obj.name());
&gt;         valid = valid + [obj];
&gt;     }
&gt; }

with a test predicate that throws exceptions, rather than a switch 
statement with a predicate returning values (or even an 
exception-throwing one wrapped up as a critical expression)?

&gt; Like I said, its mainly a small change.  However, my goal is to get it 
&gt; to a 3-stage handler, rather than the 2-stage one it is at now.  I.e.
&gt; currently you have "error-&gt;oops, do this", Richelieu brought up that it
&gt; would be nice to do 3 stages, ala "error, try this, otherwise this".  I'm
&gt; just having a hard time finding a good way to do it.

I'm not sure what you mean by this.

--
James "attack the stack" Deikun
</PRE>
