From fc7f72c03f78d389d351353daa446876320b4100 Mon Sep 17 00:00:00 2001 From: wangyang59 Date: Mon, 20 Mar 2017 16:48:41 -0700 Subject: [PATCH] modified after reyoung's comments --- python/paddle/trainer_config_helpers/layers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/paddle/trainer_config_helpers/layers.py b/python/paddle/trainer_config_helpers/layers.py index 6b0a8d56cd..b006eb46d9 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, -- GitLab