I know I always find it incredibly frustrating to get meaningless fluff back as error messages from a website.
Would it be less frustrating to get, "Error committing
to table: incorrect number of fields"?
For errors the use can maybe fix (e.g., username and
password don't match), I try to give a meaningful and
complete explanation of the problem. (At least, in
theory that's what I intend to try to do.) For
internal errors, I like to do something like the
mydie("Error Condition One in Section Gimmel");
My mydie subroutine starts out by explaining that there
is some internal problem, that it is probably not the
user's fault, that it's something the webmaster needs
to fix, and that he might be able to do so more
easily given the technical error code below. Then
I give contact info for whoever maintains the script,
and print out the string that was passed by the caller,
labelled as a Technical Error Code.
(The important thing about this string is that it is
unique, and I can grep for it to find exactly where
the problem was encountered.)
All of this can be nicely formatted in a
<div class=\"error\">...</div> so that
the site CSS can easily style it as desired. This
is MUCH nicer to the user than "Internal Server Error",
but it doesn't give a potential malicious user a great
deal of information, other than how to contact the
admin. (Then you just have to make sure this person
is not susceptible to social engineering... but you
have to do that anyway)
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||