summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-02-08 09:23:56 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-02-08 09:23:56 (GMT)
commit2015734692c79b1c2538622fcba9ceb0f24d44db (patch)
tree51c7bf9c2d087ad41b3bdfe67167b46770aa9601
parent9f0660744ceb5e04221cf4090d5e68aa8a718baa (diff)
downloadtcl-2015734692c79b1c2538622fcba9ceb0f24d44db.zip
tcl-2015734692c79b1c2538622fcba9ceb0f24d44db.tar.gz
tcl-2015734692c79b1c2538622fcba9ceb0f24d44db.tar.bz2
[3603804]: Improve example to actually be capable of throwing the trapped errors
-rw-r--r--doc/try.n2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/try.n b/doc/try.n
index 393fe5b..78a006d 100644
--- a/doc/try.n
+++ b/doc/try.n
@@ -87,7 +87,7 @@ Handle different reasons for a file to not be openable for reading:
.PP
.CS
\fBtry\fR {
- set f [open /some/file/name]
+ set f [open /some/file/name w]
} \fBtrap\fR {POSIX EISDIR} {} {
puts "failed to open /some/file/name: it's a directory"
} \fBtrap\fR {POSIX ENOENT} {} {