Skip to content

Commit

Permalink
Merge pull request #7093 from chaen/v8.0_refactor_jobSubmit
Browse files Browse the repository at this point in the history
[v8.0] refactor job submit
  • Loading branch information
fstagni authored Jul 5, 2023
2 parents 2c2fce9 + e55fd0c commit c202846
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 211 deletions.
4 changes: 2 additions & 2 deletions src/DIRAC/Core/Utilities/ReturnValues.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def __init__(self, result: DErrorReturnType | str, errCode: int = 0):
self.result = cast(DErrorReturnType, result)


def returnValueOrRaise(result: DReturnType[T]) -> T:
def returnValueOrRaise(result: DReturnType[T], *, errorCode: int = 0) -> T:
"""Unwrap an S_OK/S_ERROR response into a value or Exception
This method assists with using exceptions in DIRAC code by raising
Expand All @@ -217,7 +217,7 @@ def returnValueOrRaise(result: DReturnType[T]) -> T:
if "ExecInfo" in result:
raise result["ExecInfo"][0]
else:
raise SErrorException(result)
raise SErrorException(result, errorCode)
return result["Value"]


Expand Down
Loading

0 comments on commit c202846

Please sign in to comment.