This and other RFCs are available on the web at
  http://dev.perl.org/rfc/

=head1 TITLE

Allow exception-based error-reporting.

=head1 VERSION

  Maintainer: Bennett Todd <[EMAIL PROTECTED]>
  Date: 8 Aug 2000
  Version: 1
  Mailing List: [EMAIL PROTECTED]
  Number: 70

=head1 ABSTRACT

Allow full implementation of Fatal.pm, for programmers who prefer
exceptions for error reporting.

=head1 DESCRIPTION

Perl has traditionally reflected the Unix syscall and library
tradition for error reporting: errors are indicated by
otherwise-impossible return values, which must be checked for
explicitly, lest system error events be ignored. Some programmers
prefer to have errors print a message and exit with non-zero status,
by default, rather than having to always code " || die ...". In
perl5 this has proven elusive of implementation.

Fatal.pm has been the attempt made to date, and it suffers from two
problems. One can be fixed with further development: it should have
various lists of builtins available, e.g. :io, :system, :all for
including all calls affecting I/O, all system calls of any sort, and
all calls that can have error returns. If these were a success, then
the requested category could also be posted into a testable
variable, allowing module authors who wished to to automatically
support this functionality as well.

But Fatal.pm development stalls out early, because some builtins,
which report testable error conditions, cannot be wrapped. A
conspicuous example is print().

=head1 IMPLEMENTATION

Ensure that every perl builtin that can return an error, can be
wrapped.

I don't know whether this is purely an implementation issue (and so
lies solely in the domain of perl6-internals) or whether any
programmer-visible changes may be necessary to allow this
(justifying posting to perl6-language).

=head1 REFERENCES

  Fatal.pm, as included with recent perls.
application/pgp-signature           [Press RETURN to save to a file]

Reply via email to