RFC 88 (v2) Omnibus Structured Exception/Error Handling Mechanism

2000-08-24 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Omnibus Structured Exception/Error Handling Mechanism =head1 VERSION Maintainer: Tony Olekshy [EMAIL PROTECTED] Date: 08 Aug 2000 Last Modified: 23 Aug 2000 Version: 2 Mailing List:

Re: RFC 63 (v4) Exception handling syntax

2000-08-24 Thread Peter Scott
At 07:54 PM 8/24/00 +0400, Ilya Martynov wrote: PRL Exceptions are objects belonging to some CException class. Cthrowing PRL an exception creates the object; therefore, CEXCEPTION above is just a PRL class name (possibly including some C::). PRL PRL The Cexception function is just syntactic

Re: RFC 88 (v2) Omnibus Structured Exception/Error Handling Mechanism

2000-08-24 Thread Jonathan Scott Duff
On Thu, Aug 24, 2000 at 03:37:59PM -, Perl6 RFC Librarian wrote: =head1 TITLE Omnibus Structured Exception/Error Handling Mechanism Woohoo! catch Alarm = { ... } catch Alarm, Error = { ... } catch $@ =~ /divide by 0/ = { ... } The = here seems like useless syntax to me.

Re: RFC 88 (v2) Omnibus Structured Exception/Error Handling Mechanism

2000-08-24 Thread Jonathan Scott Duff
On Thu, Aug 24, 2000 at 10:47:45AM -0700, Peter Scott wrote: But I initially wanted to do without the = ... unfortunately that would require another keyword to handle the EXPR case and it didn't seem worth it. Not necessarily. catch { EXPR } { ... } # probably not

Re: RFC 140 (v1) One Should Not Get Away With Ignoring System Call Errors

2000-08-24 Thread Chaim Frenkel
"JH" == Jarkko Hietaniemi [EMAIL PROTECTED] writes: JH "The first operation done on the return value of open() shall be defined() JH or you shall regret your pitiful existence."? (a flag on the scalar coming JH from open that makes any other op than defined() to die and defined() clears JH the

Re: RFC 140 (v1) One Should Not Get Away With Ignoring System Call Errors

2000-08-24 Thread Jarkko Hietaniemi
On Thu, Aug 24, 2000 at 02:09:15PM -0400, Chaim Frenkel wrote: "JH" == Jarkko Hietaniemi [EMAIL PROTECTED] writes: JH "The first operation done on the return value of open() shall be defined() JH or you shall regret your pitiful existence."? (a flag on the scalar coming JH from open that

Re: Exception handling [Was: Re: Things to remove]

2000-08-24 Thread Glenn Linderman
Tony Olekshy wrote: Glenn Linderman wrote: I do recall seeing this quote; however, replacing AUTOLOAD is a very specific instance of resuming from or retrying a fault condition. And even though a retry mechanism could be generalized from AUTOLOAD to handling other conditions, it was

Re: RFC 119v2: Object neutral error handling via exceptions

2000-08-24 Thread Glenn Linderman
Tony Olekshy wrote: Yes, well, at this point I must re-iterate that (in light of reasons for the existence of a try keyword that I have explained in other messages), what you've written is the same as: try { ... } finally { do_something(); } Yes, they are equivalent. And note that

Re: Why $@ should be structured data.

2000-08-24 Thread Glenn Linderman
Tony Olekshy wrote: There you have it. That's why RFC 88 uses structured data for $@. That's a good argument, one that I have no quarrel with. As an enhancement to eval/die, this would make it more flexible for checking conditions. And with appropriate stringification, it is upward

Re: Why except and always should be a seperate RFC.

2000-08-24 Thread Glenn Linderman
Tony Olekshy wrote: Other than for the except and always clauses, RFC 199 is very similar to RFC 88. I like the idea behind except and always, but I think the proposed implementation could be dramatically simplified. The first thing to realize is that just because 119 doesn't say "try"

Re: Why fatal errors aren't special.

2000-08-24 Thread Peter Scott
At 11:21 AM 8/24/00 -0700, Glenn Linderman wrote: By building up a non-fatal error handling technique on top the existing fatal error handling technique, you are forcing code that assumes it will die to behave differently, when you wrap a try block around it. Now it will only "maybe" die.

Re: Structured exception handling should be a core module.

2000-08-24 Thread Tony Olekshy
Peter Scott wrote: At 06:06 PM 8/24/00 -0600, Tony Olekshy wrote: In fact, not only would I be pleased and honoured to author the Perl 6 core Try.pm module, I'm already working on a Perl 5 standard reference implementation. Peter, I think we should make this approach more clear in RFC

Re: RFC 140 (v1) One Should Not Get Away With Ignoring System Call Errors

2000-08-24 Thread Chaim Frenkel
"JH" == Jarkko Hietaniemi [EMAIL PROTECTED] writes: But the drawback would be that the actual victim may not be the primal cause. sub foo { my $fh = open(); ... Lots more code ... return $fh; } $victim = foo; print $victim "I'm helpless"; JH Tough. Not a nice attitude. The

Re: On the case for exception-based error handling.

2000-08-24 Thread Tony Olekshy
Glenn Linderman wrote: Tony Olekshy wrote: Glenn Linderman wrote: actually wrapping a bunch of code inside a try block affects how that code reacts to die, thus affecting the behavior of the program that previously used die to mean terminate the program. Hang on, this