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
Export "app" #8403
Export "app" #8403
Conversation
As per the comment on line 653, this appears to be the best (only?) way to let users do things like set up a custom error page to catch app-rendering-time exceptions.
@domq: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Not entirely opposed to this but is this something you weren't able to accomplish using A little more insight into what you've tried might be helpful here. |
Yeah rendering exceptions should be able to be caught with an error middleware on |
As the comment that @domq alluded to says, connect (at least the version Meteor uses) does not recursively search into nested middleware to search for 4-argument error middleware. |
Ok, so based on what @glasser is saying, and his own comment here I can understand more now why this is necessary. I hadn't remembered that was the case. Given that, I'm in favor of this change, however I think we should consider a different name. Currently the proposed API would be Should we call it EDIT: Actually, maybe this should just be |
How about |
Any thoughts, @domq? |
Well I'm honored that you would request my opinion on naming! I suppose I
can go with @HughWilson's suggestion or any other ; just let me know your
preference, and I'll rebase and resubmit.
…--
Dominique Quatravaux
dominique@quatravaux.org
Le 8 mars 2017 2:49 PM, "Jesse Rosenberger" <notifications@github.com> a
écrit :
Any thoughts, @domq <https://github.com/domq>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8403 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABjdkdBQJePMom8Z6kmOaa4h5LJMlCHGks5rjrH9gaJpZM4MHkSd>
.
|
Because as @hwillson rightfully points out: > that's what we're really exposing and `connect` themselves refer to the container that holds the defined middleware (the result of calling the `connect()` function) as a connect "app"."
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.
LGTM!
Never hurts to ask for another opinion, thanks for the response! And no worries, I've gone ahead and updated it (via GitHub Edit). Thanks, @domq. |
As per the comment on line 653, this appears to be the best (only?) way to let users do things like set up a custom error page to catch app-rendering-time exceptions.
This purports to solve #8402