File tree Expand file tree Collapse file tree
WorkloadManagementSystem/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,10 +160,6 @@ def wrapped_fcn(*args, **kwargs):
160160
161161 try :
162162 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 } " )
167163 finally :
168164 # Restore the default host certificate usage if necessary
169165 if useServerCertificate :
Original file line number Diff line number Diff line change 99
1010import DIRAC
1111from DIRAC .Core .Base .Script import Script
12+ from DIRAC .Core .Utilities .ReturnValues import S_ERROR
1213
1314
1415@Script ()
@@ -87,9 +88,13 @@ def jobexec(jobxml, wfParameters):
8788 parDict [name ] = value
8889
8990 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 } " )
9196 if not jobExec ["OK" ]:
92- gLogger .debug ("Workflow execution finished with errors, exiting" )
97+ gLogger .notice ("Workflow execution finished with errors, exiting" )
9398 if jobExec ["Errno" ]:
9499 sys .exit (jobExec ["Errno" ])
95100 else :
You can’t perform that action at this time.
0 commit comments