serve: change error mgmt#181
Merged
Merged
Conversation
Member
|
Looks fine, but I think this hook should return a Also I'd prefer a name like |
rgrinberg
approved these changes
Dec 16, 2016
Member
|
This looks good to me. I'll wait for a couple of days to give others a chance to review and unless there's feedback will merge. |
yomimono
approved these changes
Dec 16, 2016
yomimono
reviewed
Dec 16, 2016
| Lwt.catch | ||
| (fun () -> callback flow ic oc) | ||
| (fun exn -> !Lwt.async_exception_hook exn; Lwt.return_unit) | ||
| (fun exn -> exn_hook exn; Lwt.return_unit) |
Contributor
There was a problem hiding this comment.
I believe this exn_hook needs to be on_exn.
yomimono
reviewed
Dec 16, 2016
| client connection and the associated input {!ic} and output | ||
| {!oc} channels. If the callback raises an exception, it is | ||
| passed to [!Lwt.async_exception_hook]. *) | ||
| (** [serve ?backlog ?timeout ?stop ?exn_hook ~ctx ~mode fn] |
Contributor
There was a problem hiding this comment.
If exn_hook is renamed in conduit_lwt_unix.ml, it should be here too.
yomimono
reviewed
Dec 16, 2016
| [fn] callback is passed the {!flow} representing the client | ||
| connection and the associated input {!ic} and output {!oc} | ||
| channels. If the callback raises an exception, it is passed to | ||
| [exn_hook] (by default, to !Lwt.async_exception_hook). *) |
Contributor
There was a problem hiding this comment.
Another dangling exn_hook that should be on_exn.
3ba4ddb to
1f44497
Compare
Member
Author
|
Thanks Mindy :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For Tezos, we need a way that server exception are not sent to
async_exception_hook, because we want to filter them otherwise we could not differentiate them from similar exceptions coming from another part of the program.