[prev in list] [next in list] [prev in thread] [next in thread]
List: vtcl-user
Subject: Re: [vtcl-user] Error handling
From: Damon Courtney <damon () your ! unreality ! com>
Date: 2001-07-17 14:03:39
[Download RAW message or body]
> Has anyone any idea on what I can do to intercept an error and decide
> what to do with the exception?
Matteo,
If you execute a command within the Tcl "catch" statement, you can
trap the error message and handle it. Like this:
if {[catch {open file.txt w} error]} {
puts "I got an error!: $error"
}
Damon
_______________________________________________
vtcl-user mailing list
vtcl-user@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/vtcl-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic