def testExceptionHandling( self ) :

		# We don't want exceptions in one slot to prevent the
		# invocation of other slots. But we do want the errors from
		# those slots being printed to stderr.

		s = GafferUI.Gadget.ButtonSignal()
		c1 = s.connect( self.exceptionSlot )
		c2 = s.connect( self.trueSlot )

		self.assertEqual( self.exceptionSlotCalled, False )
		self.assertEqual( self.trueSlotCalled, False )

		tmpStdErr = StringIO.StringIO()
		sys.stderr = tmpStdErr
		try :
			self.assertEqual( s( None, GafferUI.ButtonEvent() ), True )
		finally :
			sys.stderr = sys.__stderr__

		self.assert_( tmpStdErr.getvalue() in "oops" )
		self.assertEqual( self.exceptionSlotCalled, True )
		self.assertEqual( self.trueSlotCalled, True )
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUITest/EventSignalCombinerTest.py/EventSignalCombinerTest.testExceptionHandling/swapped operands of `in`