what's the deal with "user error" on fail?

David Roundy droundy at abridgegame.org
Sat Nov 15 10:32:40 EST 2003


On Thu, Nov 13, 2003 at 09:23:04AM -0800, Iavor S. Diatchki wrote:
> i would say that if you are wanting to report errors to users, you should
> not use "fail" or "error".  you should instead explicitly report the
> error.

And how does one explicitly report an error? I would normally do it by
implementing something functionally equivalent to fail.  Why not let fail
serve this purpose?

> but to answer your question, i think the motivation behind "user error",
> is that this is the user from the perspective of the compiler writer,
> i.e. the programmer.  i think one should think of those errors as
> analogous to "segmentation fault" in C, or java's "unhandled exceptions",
> i.e. in a well written program the user of the program should never see
> them, but they can be useful to the programmers while debugging their
> code.

I guess it seems like a better term than "user error" could be come up
with, since most users thing that it means them.  Assuming I don't use it
for normal errors (the sort that "should" happen), then the only time
they'll see this message is when I have a bug in my code.  When that
happens I'd much rather have them see something like "bug" or "programmer
error" so they'll report it, rather than user error, which makes them
wonder if they did something wrong.
-- 
David Roundy
http://www.abridgegame.org


More information about the Haskell-Cafe mailing list