Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdk-core: fix exception cause swallowing #2949

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions projects/vdk-core/src/vdk/internal/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ def report(error_type: ResolvableBy, exception: BaseException):


def report_and_throw(
exception: BaseVdkError,
resolvable_by: ResolvableBy = None,
cause: BaseException = None,
exception: BaseVdkError, resolvable_by: ResolvableBy = None
) -> None:
"""
Add exception to resolvable context and then throw it to be handled up the stack.
Expand All @@ -205,7 +203,7 @@ def report_and_throw(
exception,
)
)
raise exception from cause
raise exception


def report_and_rethrow(error_type: ResolvableBy, exception: BaseException) -> None:
Expand Down