File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
WorkloadManagementSystem/scripts Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,6 @@ def wrapped_fcn(*args, **kwargs):
160
160
161
161
try :
162
162
return fcn (* args , ** kwargs )
163
- except Exception as lException : # pylint: disable=broad-except
164
- value = "," .join ([str (arg ) for arg in lException .args ])
165
- exceptType = lException .__class__ .__name__
166
- return S_ERROR (f"Exception - { exceptType } : { value } " )
167
163
finally :
168
164
# Restore the default host certificate usage if necessary
169
165
if useServerCertificate :
Original file line number Diff line number Diff line change 9
9
10
10
import DIRAC
11
11
from DIRAC .Core .Base .Script import Script
12
+ from DIRAC .Core .Utilities .ReturnValues import S_ERROR
12
13
13
14
14
15
@Script ()
@@ -87,9 +88,13 @@ def jobexec(jobxml, wfParameters):
87
88
parDict [name ] = value
88
89
89
90
gLogger .debug ("PYTHONPATH:\n %s" % ("\n " .join (sys .path )))
90
- jobExec = jobexec (jobXMLfile , parDict )
91
+ try :
92
+ jobExec = jobexec (jobXMLfile , parDict )
93
+ except Exception as e :
94
+ gLogger .exception ("Workflow execution failed" )
95
+ jobExec = S_ERROR (f"Workflow execution failed: { e } " )
91
96
if not jobExec ["OK" ]:
92
- gLogger .debug ("Workflow execution finished with errors, exiting" )
97
+ gLogger .notice ("Workflow execution finished with errors, exiting" )
93
98
if jobExec ["Errno" ]:
94
99
sys .exit (jobExec ["Errno" ])
95
100
else :
You can’t perform that action at this time.
0 commit comments