Console time() / timeEnd() label conversion non-compliant

Confirmed Issue #11201116 • Assigned to Jeff F.

Details

Author
Dom F.
Created
Mar 8, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Chrome
  • Firefox
Standard affected
Console Standard

Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Functions console.time() and console.timeEnd() do not throw an error when given a timer label whose type is object and whose toString() method throws an error. A good reproduction of this issue can be found by taking the code from this bin and running it in the console. You’ll see errors thrown by label.toString() are never re-thrown to the user.

More information can be found in this discussion.

console.log(‘Init’);
try {
  console.time({
    toString() {
      console.log(‘toString being called’);
      throw new Error(‘dom’);
    }
  });
} catch(e) {
  console.log('Inside catch with %o’, e);
}
console.timeEnd({a: 10})

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Steps to Reproduce

      Changed Status to “Confirmed”

      Changed Assigned To to “Newton J.”

      Changed Assigned To from “Newton J.” to “Jeff F.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in