readBlocking and timeout exception

If the error was a direct throw of that TimeoutException, your except clause would work. But it is being wrapped in some other throwable (the TimeoutException add as the cause). I recommend this structure for this case:

import java.lang.Throwable

def someFunction():
	try:
		system.tag.writeBlocking(.....)
	except java.lang.Throwable, t:
		# do something, including looking at t.cause
	except Exception, e:
		# do something with other python problems.
2 Likes