-
Notifications
You must be signed in to change notification settings - Fork 38
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
Catch exceptions in parent.override #50
Conversation
plugin.js
Outdated
try { | ||
this.server = this.parent.override(server, func, this.opts) | ||
} catch (err) { | ||
return cb(err) |
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.
Can you also add a debug
log?
Yes, can you send another PR? |
plugin.js
Outdated
try { | ||
this.server = this.parent.override(server, func, this.opts) | ||
} catch (err) { | ||
debug('exec errored', name) |
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.
I think is more correct (´override errored: '${name}'´, err)
:D
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
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
This PR should allow fastify/fastify#778 to be fixed.
N.B.: I think
Boot.prototype.start
should returnthis
. Do you?