: That numerical part could then form the basis of the extended exception
: mechanism. No, the programmer shouldn't memorize the error numbers:
: there should be predefined constants, like
:
: ERROR::filenotfound
:
: which are numeric, and which could then be used for the catch
Bart Lateur writes:
: Apropos those extended mechanisms: couldn't we use the same mechanism as
: is currently in use for $!, for $@ too? I mean: $! in numerical context
: gives an error number, in string context a text string. Then
:
: die "I'm outta here: $!";
:
: should assign both the
On Thu, 24 Aug 2000 17:12:11 -0700, Peter Scott wrote:
eval {
open "some_name_for_a_file_that_does_not_exist";
# $! set to "file or directory does not exist"
undef;
}
# $! set to "" (or undef, whichever makes more sense) on
# eval block termination
On 24 Aug 2000 16:03:56 -, Perl6 RFC Librarian wrote:
Merge C$!, C$^E, and C$@
Merging $! and $^E makes perfect sense to me. I don't know why there are
two different error variables. Er... wasn't that three? I'm not
absolutely certain, but I thought there was a third one, too. time
At 10:37 PM 8/24/00 +0200, Bart Lateur wrote:
On 24 Aug 2000 16:03:56 -, Perl6 RFC Librarian wrote:
Merge C$!, C$^E, and C$@
Merging $! and $^E makes perfect sense to me. I don't know why there are
two different error variables.
$! eq "No such file or directory"; $^E eq "CD-ROM drive
On Thu, 24 Aug 2000 13:50:56 -0700, Peter Scott wrote:
But $@ is an entirley different beast.
The proposal is that $! would be overwritten with the die string. Reason:
whoever's interested in both $@ and $! at the end of an eval? There was an
error; everyone looks at $@, which almost