[% setvar title All perl generated errors should have a unique identifier %]
|Note: these documents may be out of date. Do not use as reference!|
To see what is currently happening visit http://www.perl6.org/
All perl generated errors should have a unique identifier
Maintainer: Chaim Frenkel <email@example.com> Date: 9 Aug 2000 Last Modified: 19 Sep 2000 Mailing List: firstname.lastname@example.org Number: 85 Version: 2 Status: Developing
All perl generated errors should have a unique identity. So that changes in the text should not cause breakage in code.
Currently many programs handle error returns by examining the text of the error returned in $@. This makes changes in the text of the error message, an issue for the backwards compatibility police.
In addition error messages can be localized without effecting a working script.
Each unique identifier once assigned as part of a stable release of perl will be guarenteed never to be changed, or if the error text is removed, never to be reused.
This RFC currently makes no attempt to define the actual methodology of how the unique ids are assigned or how they will be made available at the language level.
However some discussion was sparked by the original RFC and is left as a historical note.
Each error message will be assigned a unique number. The number could be made accessible via the $@ in a numeric context.
This would be simple and direct. With no major hassles.
Each error message will have a unique string assigned.
The unique string could be accessible as
An id string could have some structure associated to enable better handling. One suggestion was to follow the lead of VMS.
facility: The program (or, in perl's case, the thing that errored) status: I=information, W=warning, E=error, S=Severe error message-code: A one word abbreviation for the text message text message: A human readable string with more detail A sample error: %APPEND-I-CREATED, MEM.SUM;1 created
For perl the actual text would be in $@.
or rather than make the user break up the text string the values could be supplied as
$@->id # The unique identifier for this error $@->facility # regex, io, syscall $@->severity # Fatal, Warning, Informationl,
Bryan C. Warnock <email@example.com> Peter Scott <Peter@PSDT.com> Uri Guttman <firstname.lastname@example.org> Ariel Scolnicov <email@example.com> Juanma Barranquero <firstname.lastname@example.org> "Paul L. Allen" <email@example.com> Brian Wheeler <firstname.lastname@example.org>
IBM Messages and Codes
VMS (anyone have a reference)