'If an unexpected error occurs Docker gets back a useful error message.'

@capture_logging((lambda self, logger: self.assertEqual(len(logger.flushTracebacks(CustomException)), 1)))
def test_unexpected_error_reporting(self, logger):

    def error():
        raise CustomException("I've    made    a    terrible    mistake")
    self.patch(self.flocker_client, 'list_datasets_configuration', error)
    return self.assertResult('POST', '/VolumeDriver.Path', {u'Name': u'whatever'}, OK, {u'Err': "CustomException:    I've    made    a    terrible    mistake"})
