-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Amp-font: Un-handled Promise Rejection #1095 #1107
Conversation
@@ -124,7 +128,7 @@ export class AmpFont extends AMP.BaseElement { | |||
this.onFontLoadSuccess_(); | |||
}).catch(error => { | |||
this.onFontLoadError_(); | |||
throw error; | |||
log.warn(TAG_, error, this.element); |
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.
The logger isn't the right tool in its current form as content devs never see it.
@erwinmombay was looking into fixing that, but I believe for now we should use console.warn/log.
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.
@cramforce lets go with that, that'll make it easier for me to separate them.
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.
@erwinmombay Go with what?
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.
@cramforce using console.log/warn, i have a branch that separates amp-dev logs vs publisher-dev logs, so this makes it easier for me to follow up. (where console.log/warn will always be publisher-dev logs)
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.
SGTM
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.
@dvoytenko suggested log.warn - as opposed to console.warn.
I have added a warn. @cramforce Comment on which one needs removal now
Ideally it would be nice to have log.warn decide which ones should be console.warn'd, rather than using 2 different logging systems
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.
@sriramkrish85 @erwinmombay is working on unifying the 2.
For now add console.warn
53485ba
to
370d5a7
Compare
@sriramkrish85 LGTM |
Amp-font: Un-handled Promise Rejection #1095
Amp-font: Unhandled Promise Rejection #1095