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

improve error handling, through additional exception handler in done_callback #144

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

maurerle
Copy link
Collaborator

@maurerle maurerle commented Dec 5, 2024

These exception fail silently otherwise.

We can think about letting users handle this on their own by having a construct like, though I like to provide users with a decent error messages by default:

def handle_exception(loop, context):
    # context["message"] will always be there; but context["exception"] may not
    msg = context.get("exception", context["message"])
    logger.exception(f"Caught exception: {msg}")

...

self.loop.set_exception_handler(handle_exception)

and adding this to the task loop through set_exception_handler

We also reduce the log messages in the distributed_clock as this is more of an info

maurerle added a commit to assume-framework/assume that referenced this pull request Dec 5, 2024
maurerle added a commit to assume-framework/assume that referenced this pull request Dec 5, 2024
…allback#

These exception fail silently otherwise
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.85%. Comparing base (f89fd83) to head (be6d444).
Report is 2 commits behind head on development.

Files with missing lines Patch % Lines
mango/util/scheduling.py 60.00% 4 Missing ⚠️
mango/util/distributed_clock.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #144      +/-   ##
===============================================
- Coverage        88.97%   88.85%   -0.12%     
===============================================
  Files               22       22              
  Lines             2458     2468      +10     
===============================================
+ Hits              2187     2193       +6     
- Misses             271      275       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maurerle maurerle mentioned this pull request Dec 9, 2024
@maurerle maurerle requested a review from rcschrg December 9, 2024 13:10
@rcschrg rcschrg merged commit bafecfa into development Dec 9, 2024
8 of 10 checks passed
@maurerle maurerle deleted the error_handling branch December 9, 2024 14:24
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.

2 participants