| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -392,11 +392,17 @@ async def _receive_loop(self) -> None: | |
| # call it with the progress information | ||
| if progress_token in self._progress_callbacks: | ||
| callback = self._progress_callbacks[progress_token] | ||
| await callback( | ||
| notification.root.params.progress, | ||
| notification.root.params.total, | ||
| notification.root.params.message, | ||
| ) | ||
| try: | ||
| await callback( | ||
| notification.root.params.progress, | ||
| notification.root.params.total, | ||
| notification.root.params.message, | ||
| ) | ||
| except Exception as e: | ||
| logging.error( | ||
| "Progress callback raised an exception: %s", | ||
| e, | ||
| ) | ||
|
Comment thread
Comment on lines
+402
to
+405
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitylogging.exception instead of logging.error.
Sorry, something went wrong.
All reactions
|
||
| await self._received_notification(notification) | ||
| await self._handle_incoming(notification) | ||
| except Exception as e: | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThere's an outer exception block 🤔
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityFair - how would you propose addressing the misleading part here instead? The callback could be anything, so it could throw any kind of exception.
We could potentially replace 410 to just be a generic logging.exception(e) without any additional decoration? In order to be more broad without adding misleading commentary?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.