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

console.timeEnd shouldn't throw if there is no matching label #3514

Closed
DavidBruant opened this issue Oct 25, 2015 · 5 comments
Closed

console.timeEnd shouldn't throw if there is no matching label #3514

DavidBruant opened this issue Oct 25, 2015 · 5 comments
Labels
console Issues and PRs related to the console subsystem. good first issue Issues that are suitable for first-time contributors.

Comments

@DavidBruant
Copy link

There is a test expecting that behavior, but it probably isn't a sensible behavior.

A better behavior would be to fail silently while printing a message to stderr saying there is no corresponding label.

@mscdex mscdex added the console Issues and PRs related to the console subsystem. label Oct 25, 2015
@cjihrig
Copy link
Contributor

cjihrig commented Oct 25, 2015

I'm not saying the current behavior is write or wrong, but it looks like it's been that way for quite a while.

Seems that Chrome does not throw in a similar situation.

@DavidBruant
Copy link
Author

Seems that Chrome does not throw in a similar situation.

Neither does Firefox AFAICT

@mscdex
Copy link
Contributor

mscdex commented Oct 25, 2015

If we're going to use Chrome and Firefox as models, then we should just ignore invalid labels and not print anything.

@cjihrig
Copy link
Contributor

cjihrig commented Oct 25, 2015

@bnoordhuis do you remember the original purpose for throwing (it looks like you landed the commit)?

We would still have to assume that someone, somewhere is relying on that exception being thrown, and treat this as a semver major change

@jasnell jasnell added the good first issue Issues that are suitable for first-time contributors. label Mar 22, 2016
@jasnell
Copy link
Member

jasnell commented Apr 27, 2016

Fixed in #5901

@jasnell jasnell closed this as completed Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues and PRs related to the console subsystem. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

No branches or pull requests

4 participants