Consider merging https://chromium.googlesource.com/chromium/blink/+/4010ed524b9d6348a76567b55fbe1a756a6f35ef DOMException toString is not correct We used to print: "Error: HIERARCHY_REQUEST_ERR: DOM Exception 3" Now we print a more useful message: "HierarchyRequestError: The operation would yield an incorrect node tree." that is: `${error.name}: ${error.message}`
So, Chromium no longer prints the exception code, yet it prints arbitrary text from exception description that may or may not be relevant to the actual reason this particular exception was raised for? I don't think that it's an improvement overall.
I think some description is nice. I've had to search for DOM exception codes one to many times. I agree the exception code should still be in there.
The exception code is deprecated. Use the name property instead. Most new exceptions have the code set to 0. AP: The error messages could definitely use some improvements. The long term goal was to allow the error message to be more specific based on were it was being set/thrown.