[3168] in java-interest
Re: I want to shoot myself!!!!!!!!!!!!!!!!!!
daemon@ATHENA.MIT.EDU (David Forster)
Thu Nov 2 03:17:10 1995
Date: Thu, 2 Nov 1995 00:55:11 -0500
To: jpayne@starwave.com (Jonathan Payne)
From: mentor@io.org (David Forster)
Cc: Thomas.Ball@Eng.Sun.COM, java-interest@java.Eng.Sun.COM
At 12:18 1/11/95, Jonathan Payne wrote:
>> From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
>>
>> Basically, there are two groups of errors: those you can reasonably
>> recover from and those you can't.
>
>...
>
>OK, I have a regular expression package. MalformedRegexpException is
>thrown when you try compiling an expression that is bogus. This fits
>into the category of not-recoverable. It was a programming error of
>mine which caused me to generate a bogus regexp string.
Not necessarily. What if you read the search string in from the UI? You
don't want to check the string before passing it off to the regexp package,
do you? So you pass it in, the parser throws an exception of some sort, and
you probably do want to catch it in this case.
>OK, how about adding a record to a database. [failure due to mismatched type]
What if it fails because there's no more space in the DB?
>> From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
>>...
>> RuntineExceptions should be used only for things that can happen anywhere
>> regardless of what method you are calling.
I think both Tom's and Arthur's views are useful, but I think we should be
careful about which errors are considered recoverable and which not. Much
depends on context.
Cheers,
David Forster <br><a href="http://www.io.org/~mentor">
Mentor Software Solutions </a><br>
+1 905 832 4837 <br>
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com