This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message. 
	 
Help for those learning Tcl or writing their own scripts.
			
		
				
			- 
				
								NewzNZ							
- Halfop
- Posts: 68
- Joined: Thu Mar 05, 2009 5:15 am
- 
				Contact:
				
			
						
					
													
							
						
									
						Post
					
								by NewzNZ » 
			
			
			
			
			
			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!
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			- 
				
								Ofloo							
- Owner
- Posts: 953
- Joined: Tue May 13, 2003 1:37 am
- Location: Belguim
- 
				Contact:
				
			
						
					
						
		
													
							
						
									
						Post
					
								by Ofloo » 
			
			
			
			
			
			Code: Select all
catch {puts some error to put out} error
puts $error
Tcl: 
catchXplaiN but think of me as stupid
			
						 
		 
				
		
		 
	 
				
		
				
			- 
				
								NewzNZ							
- Halfop
- Posts: 68
- Joined: Thu Mar 05, 2009 5:15 am
- 
				Contact:
				
			
						
					
						
		
													
							
						
									
						Post
					
								by NewzNZ » 
			
			
			
			
			
			Many thanks Offlo - have now integrated this in my scripts and I understand how catch works now...
Cheers!