Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Style guide for error messages?

by jplindstrom (Monsignor)
on Sep 22, 2005 at 11:17 UTC ( #494080=note: print w/ replies, xml ) Need Help??


in reply to Style guide for error messages?

In addition to your stuff:

  • Always provide necessary variables that may be interesting in the context of the error.
    die("Could not open file $file: $!\n");
  • Always put delimiters around the variables, so that you don't get tricked by whitespace, weird chars, line feeds, etc.
    die("Could not open file ($file): ($!)\n");

/J


Comment on Re: Style guide for error messages?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://494080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-07-02 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (27 votes), past polls