From 98040fe8bcb5786e0e2743bc32dc10b576f86f93 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 8 Feb 2013 09:23:56 +0000 Subject: [3603804]: Improve example to actually be capable of throwing the trapped errors --- doc/try.n | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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} {} { -- cgit v0.12