Skip to content

Commit bc83b7f

Browse files
committed
2 parents aca9895 + ef493c6 commit bc83b7f

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

_data/outputs/result.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.05
1+
0.005

ocean_runner/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from ocean_runner.config import Config, Environment
22
from ocean_runner.runner import Algorithm
33

4-
__all__ = [Config, Algorithm, Environment] # type: ignore
4+
__all__ = ["Config", "Algorithm", "Environment"]

ocean_runner/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def default_error_callback(
2929
error: Exception,
3030
) -> None:
3131
algorithm.logger.exception("Error during algorithm execution")
32-
raise error
32+
raise Algorithm.Error() from error
3333

3434

3535
def default_validation(algorithm: Algorithm[InputT, ResultT]) -> None:
@@ -184,7 +184,7 @@ async def execute(self) -> ResultT | None:
184184
self.job_details.paths.outputs,
185185
)
186186

187-
except Exception as e:
187+
except Algorithm.Error as e:
188188
await run_in_executor(self._functions.error, self, e)
189189

190190
return self._result

tests/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def run(algorithm: Algorithm):
100100

101101
@setup_algorithm.on_error
102102
def callback(algorithm: Algorithm, error: Exception):
103-
raise error
103+
raise Algorithm.Error() from error
104104

105105
with raises(Algorithm.Error):
106106
setup_algorithm()

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)