| View previous topic :: View next topic |
| Author |
Message |
NewzNZ Halfop

Joined: 05 Mar 2009 Posts: 60
|
Posted: Wed Jun 03, 2009 8:14 pm Post subject: catching error |
|
|
Hi - I'm just looking for a simple way to catch the log error:
"couldn't open socket: host is unreachable"
then, do "something".
I run many sockets so just want to run this check every so often for the errors.
Thanks in advance! |
|
| Back to top |
|
 |
Ofloo Owner
Joined: 13 May 2003 Posts: 953 Location: Belguim
|
Posted: Wed Jun 03, 2009 11:07 pm Post subject: |
|
|
| Code: | catch {puts some error to put out} error
puts $error |
Tcl: catch _________________ XplaiN but think of me as stupid |
|
| Back to top |
|
 |
NewzNZ Halfop

Joined: 05 Mar 2009 Posts: 60
|
Posted: Sat Jun 06, 2009 10:36 pm Post subject: |
|
|
Many thanks Offlo - have now integrated this in my scripts and I understand how catch works now...
Cheers! |
|
| Back to top |
|
 |
|