[% setvar title Improvement needed in error messages (both internal errors and die function). %]
To see what is currently happening visit http://www.perl6.org/
Improvement needed in error messages (both internal errors and die function).
Maintainer: S. A. Janet <firstname.lastname@example.org> Date: 30 Sep 2000 Mailing List: email@example.com Number: 359 Version: 1 Status: Developing
Error messages should contain the word `ERROR' in them. Messages due to internal errors should contain `INTERNAL ERROR'.
Error messages should also contain the program name, or if that is not known, the word `perl'.
Internal error messages should be improved. For example,
% perl -le 'print "PRIME" if (1 x shift) !~ /^(11+)\1+$/' 373403020102920303 Out of memory!
is a poor message. This is better: "perl: FATAL ERROR: out of memory".
This should require very minor improvements to die and the addition of a function e.g. setprogramname() to register the program name internally:
% cat foo.pl setprogramname( $0 ); die "filenames expected" if ( $#ARGV < 0 ); ... $ perl foo.pl foo.pl: FATAL ERROR: filenames expected