diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 6b0a8d56cdf20b44be7f467ddd5d1be8e8d782a1..b006eb46d99fd09c7bc31e5de41ebdb39659b663 100755 --- a/python/paddle/trainer_config_helpers/layers.py +++ b/python/paddle/trainer_config_helpers/layers.py @@ -713,9 +713,8 @@ class MixedLayerType(LayerOutput): return self def __exit__(self, exc_type, exc_value, tb): - if exc_type != None: - traceback.print_exception(exc_type, exc_value, tb) - sys.exit(1) + if exc_value is not None: + raise exc_value assert len(self.inputs) != 0 ml = MixedLayer( name=self.name,