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

chore: specify raising exceptions in daemon module #1249

Merged
merged 9 commits into from
Feb 14, 2025
Merged

Conversation

vladopajic
Copy link
Member

@vladopajic vladopajic commented Feb 12, 2025

CatchableError in this PR where listed because P2PStreamCallback had it listed before in #1233 effort.

part of #962 effort.

@vladopajic vladopajic enabled auto-merge (squash) February 12, 2025 18:55
@vladopajic vladopajic disabled auto-merge February 12, 2025 18:55
@vladopajic vladopajic enabled auto-merge (squash) February 12, 2025 18:55
@vladopajic vladopajic changed the title chore: specify raising exceptions in daemon package chore: specify raising exceptions in daemon module Feb 13, 2025
@vladopajic vladopajic marked this pull request as draft February 13, 2025 14:46
auto-merge was automatically disabled February 13, 2025 14:46

Pull request was converted to draft

api: DaemonAPI, ticket: PubsubTicket
) {.
async: (
raises: [TransportIncompleteError, TransportError, CancelledError, CatchableError]
Copy link
Member Author

Choose a reason for hiding this comment

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

CatchableError has to be listed here because ticket.handler raises it.

@vladopajic vladopajic marked this pull request as ready for review February 14, 2025 10:06
Copy link
Member

@richard-ramos richard-ramos left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -903,9 +965,9 @@ proc openStream*(
stream.flags.incl(Outbound)
stream.transp = transp
result = stream
except CatchableError as exc:
except ResultError[ProtoError]:
Copy link
Member

Choose a reason for hiding this comment

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

TIL about this type of errors

@vladopajic vladopajic merged commit be33ad6 into master Feb 14, 2025
20 checks passed
@vladopajic vladopajic deleted the raising-daemon branch February 14, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

2 participants