ThrowCodeError vs ThrowUserError
Gervase Markham
gerv at mozilla.org
Thu Apr 15 22:40:36 UTC 2004
David Miller wrote:
> The rule we've been using has been pretty much:
>
> "When in doubt, it's a code error, since it's better for usability to
> blame the program when it's the user's fault than blame the user when
> it's the program's fault. Programs don't have feelings, but users do,
> and blaming users wrongly hurts and frustrates them."
>
> However, I would postulate that blaming the program wrongly hurts the
> developers or the admin if the program actually isn't broken. We
> perhaps need a third way to safely blame neither?
That sort of makes sense; except that there should be no such thing as a
"User Error" - ideally, the design of the program makes errors
impossible or, if it can't, apologises and explains when the user makes one.
So the text of ThrowUserError shouldn't blame the user.
> The current text surrounding all error messages thrown with
> ThrowCodeError basically says that Bugzilla is broken, and requests that
> you save the page and mail it to the maintainer.
Indeed. Such text should only be used when Bugzilla is actually
definitely broken, rather than invalid input has been entered. This may
mean we don't get bugs filed when there actually is a bug, but that's
the price we have to pay.
> When I was working for AOL on the project we were doing for "Zippy",
I presume you mean "called 'Zippy'"; if it were "for Zippy", it would
also have to be for Bungle, George, Rod, Jane and Freddy. ;-)
(Bystanders: if you don't know who these people are, Google.)
> What I posted on that bug is that ThrowUserError does not automatically
> blame the user. ThrowUserError does nothing but put your error message
> in a red box.
I actually think even that's too strong.
Gerv
More information about the developers
mailing list