Couldn't you have just included an example snippet of what
it would have looked like and then just included a note
that the object you called here is a home-built
error-reporting mechanism?
I find that people learn style from what are meant as
off-hand snippets, and so I think it is important that
everything from pseudo-code on up always at least
acknowledge the importance of testing for and dealing
with errors. I would prefer that people think, Geez,
that tilly is anal about error checking! than
accidentally encourage (if only by omission) people to
neglect it... | [reply] |
I probably could have, but I don't think it would have added value. When I write example code, I add detail where it is relevant to the thread, and remove it where it is not. How many times do you see a simple open FILE, "file" or die; in an snippet? To me, it is clear that is just a placeholder, showing, but not elaborating upon, the error handling one would normally expect.
In fact, my code started out with open FILE, $_ or die; and warn "Error!" if $@;. Perhaps I should have left it that way, making it clear the error handling was in fact a simplification, and not representative of what belongs in a real program.
| [reply] [d/l] [select] |
| [reply] |