'Test decorators when exceptions are thrown.'

def testExceptionHandling(self):

    stats.STATS.RegisterCounterMetric('test_counter')
    stats.STATS.RegisterEventMetric('test_timed', bins=[0.0, 0.1, 0.2])
    self.assertRaises(Exception, self.RaiseFunc, 0.11)
    m = stats.STATS.GetMetricValue('test_timed')
    self.assertEqual(m.bins_heights[0.0], 0)
    self.assertEqual(m.bins_heights[0.1], 1)
    self.assertEqual(m.bins_heights[0.2], 0)
    self.assertEqual(stats.STATS.GetMetricValue('test_counter'), 1)
