egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

catching error

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
NewzNZ
Halfop


Joined: 05 Mar 2009
Posts: 60

PostPosted: Wed Jun 03, 2009 8:14 pm    Post subject: catching error Reply with quote

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
View user's profile Send private message Visit poster's website
Ofloo
Owner


Joined: 13 May 2003
Posts: 953
Location: Belguim

PostPosted: Wed Jun 03, 2009 11:07 pm    Post subject: Reply with quote

Code:
catch {puts some error to put out} error

puts $error


Tcl: catch
_________________
XplaiN but think of me as stupid
Back to top
View user's profile Send private message Visit poster's website
NewzNZ
Halfop


Joined: 05 Mar 2009
Posts: 60

PostPosted: Sat Jun 06, 2009 10:36 pm    Post subject: Reply with quote

Many thanks Offlo - have now integrated this in my scripts and I understand how catch works now...

Cheers!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber