Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A guide to good errors...

0 views
Skip to first unread message

Fredderic

unread,
May 1, 2006, 7:59:40 PM5/1/06
to
Is there a reasonably comprehensive guide anywhere, on how best to throw
(or re-throw) a good error message? I've got scripts which need to
return errors for one reason or another, and some do it better than
others.

For instance, if you've got a procedure which is two-third error
handling code, for example parsing a complicated user input field, you
don't want to have to write a page of code just to format the error
message correctly. But you also don't want to dig through an overly
cryptic error message when something goes wrong.

From what I've seen, the really ugly error reporting is mostly confined
to control structures, but I've got a few [foreach] style bits and
pieces (things like [dict for] and [dict with]), and even worse still
are callbacks (which I also use rather a lot), and writing their error
reporting (more so than error handling per-se) is a right royal pain in
the a***, especially when you don't really have a 100% clear idea of
how errors are really supposed to be reported to begin with.


I'm still using TCL 8.4.12, personally, so documentation for the
pre-funky-[return] would be handy. ;)


Fredderic

0 new messages