From 70dfa8083e2ba210f2cde390b7418e6f6201fff7 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Tue, 24 Jul 2007 15:27:24 +0000 Subject: [PATCH] Save traceback along with exception so that the real traceback is displayed when exception is raised again later. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15299 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/patches/DCWorkflow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product/ERP5Type/patches/DCWorkflow.py b/product/ERP5Type/patches/DCWorkflow.py index 18cefba7c8..2a49863799 100644 --- a/product/ERP5Type/patches/DCWorkflow.py +++ b/product/ERP5Type/patches/DCWorkflow.py @@ -30,6 +30,7 @@ from DateTime import DateTime from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Utils import convertToMixedCase from string import join +import sys from zLOG import LOG # Patch WorkflowUIMixin to add description on workflows @@ -257,6 +258,7 @@ def DCWorkflowDefinition_executeTransition(self, ob, tdef=None, kwargs=None): except ValidationFailed, validation_exc: before_script_success = 0 before_script_error_message = validation_exc.msg + validation_exc_traceback = sys.exc_traceback except ObjectMoved, moved_exc: ob = moved_exc.getNewObject() # Re-raise after transition @@ -308,7 +310,7 @@ def DCWorkflowDefinition_executeTransition(self, ob, tdef=None, kwargs=None): error_message = before_script_error_message) if validation_exc : # reraise validation failed exception - raise validation_exc + raise validation_exc, None, validation_exc_traceback return new_sdef # Update state. -- 2.30.9