Skip to content

Commit cf78353

Browse files
committed
feat: Improve error message when convertToReturnValue catches a DiracX error
1 parent 8cfb015 commit cf78353

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/DIRAC/Core/Utilities/ReturnValues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def wrapped(*args: P.args, **kwargs: P.kwargs) -> DReturnType[T]:
239239
except SErrorException as e:
240240
return e.result
241241
except Exception as e:
242-
retval = S_ERROR(repr(e))
242+
retval = S_ERROR(f"{repr(e)}: {e}")
243243
# Replace CallStack with the one from the exception
244244
# Use cast as mypy doesn't understand that sys.exc_info can't return None in an exception block
245245
retval["ExecInfo"] = cast(tuple[type[BaseException], BaseException, TracebackType], sys.exc_info())

0 commit comments

Comments
 (0)