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

Rethrow exceptions #87

Merged
merged 3 commits into from Aug 31, 2018
Merged

Conversation

JelleAalbers
Copy link
Member

This changes exception handling in the mailbox and processor systems so the original exception, rather than MailboxKilled, is thrown to the user.

This also adds a test to ensure the correct original exception is stored in the metadata; and changes the warning on loading data with no chunks to an error (new custom exception class DataCorrupted).

e_args = ''
self.kill(reason=f"{e.__class__.__name__}('{e_args}') "
f'in {threading.current_thread().name}')
self.kill(reason=(e.__class__, e, sys.exc_info()[2]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I add variables to the exception (e.key), will that get propogated out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it reraises the original object

@JelleAalbers JelleAalbers merged commit 72e82e6 into AxFoundation:master Aug 31, 2018
@JelleAalbers JelleAalbers deleted the exc_rethrow branch August 31, 2018 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants