[Tutor] RE: How can handle exception?

Mark McEahern marklists@mceahern.com
Sat, 5 Jan 2002 07:34:52 -0800


Ladislav:
> Hello,
> My program sometimes raise the exception
> 
> socket.error: (10061, 'Connection refused')
> 
> How can I handle this kind of exception?

try:
	# your code that's failing
except:
	# what you want to do when it fails

// mark