On 2/11/20 8:57 AM, Anne van Kesteren wrote:
I don't know how much work this is, but ideally the signature is
something like throwType(safeMessage, consoleMessage), whereby
consoleMessage defaults to safeMessage or some such.

We can certainly do that. It's "some" work for DOMException: adjusting the API callsites to accept the extra arg, adjusting the internal ErrorResult storage to store it, adjusting DOMException to store it, exposing a [ChromeOnly] accessor on DOMException. I can throw this together pretty quickly. Then devtools would needto use the new accessor.

For JS exceptions it would require SpiderMonkey-side changes which would be a lot more involved, as far as I can tell, including changes to the generally less-flexible "throw a TypeError" API we have to work with. I'd want someone on the SpiderMonkey team to do this, ideally, because I'm not sure which parts of this setup we really want and which we can throw overboard..

The hard part, of course, is knowing when to do the separate consoleMessage thing...

-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to