Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Modula 3 > Re: Why does a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 82 of 151
Post > Topic >>

Re: Why does a run-time error skip FINALLY ?

by Olaf Wagner <wagner@[EMAIL PROTECTED] > Jan 17, 2004 at 12:07 PM

Henning Thielemann <iakd0@[EMAIL PROTECTED]
> wrote:

> I have noticed that a checked run-time error skips the FINALLY clause in
a
> TRY-FINALLY in cm3. Amusingly the occurence of an exception that is not
> handled _is_ a checked run-time error by itself. In "Programming with
> Style - Introduction into programming with Modula-3"  the authors
mention
> this behaviour and rate it as unsuitable. This is also my judgement in
the
> first moment - so what are the reasons to go that way? 

To get an authoritative answer to this question, we would have to ask
Farshad Nayeri or Bill Kalsow, I think, but I can give some possible
reasons:

 1) Run-time errors must be handled immediately, as they may be caused
    by serious resource problems, in which situation even the execution
    of a FINALLY block might only make the situation worse and lead
    to more breakage and exceptions.
 2) Run-time errors constitute a class of exceptions of their own which
    must be handled explicitly.
 3) The compiler warns about uncaught exceptions, so you can avoid
    those programming errors (like other incomplete case distinctions).
    And you can always add an ELSE clause, which will not handle
    any run-time error, but catch the (user-defined) forgotten
    exception that would otherwise be converted into a run-time error.

Olaf
-- 
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|| Olaf Wagner           | wagner(at)luthien.in-berlin.de (priv.)|
|| Cranachstrasse 7      | wagner(at)elego.de (business)         |
|| D-12157 Berlin        | phone: +49 30  85 60 26 70            | 
|| Germany / Deutschland | fax:   +49 30  85 58 01 88            | 
\/////////////////////////////////////////////////////////////////
 




 2 Posts in Topic:
Why does a run-time error skip FINALLY ?
Henning Thielemann <ia  2004-01-16 15:43:23 
Re: Why does a run-time error skip FINALLY ?
Olaf Wagner <wagner@[E  2004-01-17 12:07:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 11:07:51 CDT 2008.