Re: [TCLCORE] Back to TIP 267
by Donal K. Fellows other posts by this author
Oct 27 2007 6:07PM messages near this date
Re: [TCLCORE] Back to TIP 267
|
[TCLCORE] Changing default auto_path at configure-time.
Kevin Kenny wrote:
> Execute this script using [exec], and you get:
>
> % catch {exec [info nameof] hello.tcl} result
> 1
> % set result
> Goodbye, cruel world!
>
> In other words, an error gets thrown with the contents of stderr
> as the result. Paradoxically, the only way to distinguish this
> case from a failed [exec] is that ::errorCode shows no error:
>
> % set ::errorCode
> NONE
>
> -ignorestderr provides a way to turn off this bizarre behaviour.
This is all caused by the fact that, although there is a standard way to
indicate errors, many programmers (especially of applications) have
never heard of it and think spewing out a message on stderr is all they
need to do. On the other hand, there are also programs that indicate
some of their normal returns with non-zero exit codes, and also yet
others who write even error messages to stdout.
People who think their apps will only ever be used by people (and then
only interactively) do some horrible crimes against proper programming.
Donal.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now > > http://get.splunk.com/
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Alexandre Ferrieux
Kevin Kenny
Alexandre Ferrieux
Alexandre Ferrieux
Donal K. Fellows
|