Re: [TCL] Help debugging behavior in new source command
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: [TCL] Help debugging behavior in new source command

From: Bryan Oakley <oakley@bardo.clearlight.com>
Date: Thu Apr 13 2006 - 18:32:26 CEST

Andrew Falanga wrote:
> Don Porter wrote:

>>Process exit is a pretty severe reaction to a missing file.
>>Sure that's what you want?
>
>
> In this case, I'm pretty sure that is what I want. I'm typically going
> to be sourcing in libraries and if I can't find them, the script won't
> run anyway.
>

Once could argue that the decision to abort doesn't belong in a utility
procedure like "source" (or its replacement). It seems more logical to
throw an error and let your main program deal with it.

For example, you might want to first display a dialog explaining why the
program is exiting rather than just exiting. Even better, you might want
to try sourcing all your files before exiting; if more than one is
missing you can report all the failures at once rather than failing on
the first, forcing the user to make a change, then failing on the second
forcing another small change, etc.

Ultimately it's your call, of course. We're just throwing out suggestions.

-- 
Bryan Oakley
http://www.tclscripting.com
Received on Sun Apr 30 03:10:50 2006