Sujet : Re: try command error codes, where documented?
De : gregor.ebbing (at) *nospam* gmx.de (greg)
Groupes : comp.lang.tclDate : 17. Aug 2024, 05:45:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9p9u9$1poub$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
Am 16.08.24 um 20:28 schrieb et99:
Is there a good place to lookup the various error codes returned by tcl commands?
In the try command manual there's an example:
try {
set f [open /some/file/name w]
} trap {POSIX EISDIR} {} {
puts "failed to open /some/file/name: it's a directory"
} trap {POSIX ENOENT} {} {
puts "failed to open /some/file/name: it doesn't exist"
}
How did the writer of this example know about these two error cases since they are not documented in the manual under either try or open.
Also, are POSIX error codes system independent?
Hello;
maybe this helps:
https://www.tcl.tk/man/tcl8.6/TclCmd/tclvars.htm#M12source code tcl 8.6
./tcl8.6.14/win/tclWinError.c
/.tcl8.6.14/generic/tclPosixStr.c
https://en.wikipedia.org/wiki/Errno.h