On Sat, Sep 14, 2019 at 6:50 AM Boris Zbarsky <bzbar...@mit.edu> wrote: > That means not using the following when throwing nsresults/DOMExceptions: > > ErrorResult::Throw(nsresult) > ErrorResult::operator=(nsresult) > > and instead using: > > ErrorResult::ThrowDOMException(nsresult, const nsACString&) > > which allows passing a message string that explains why the exception is > being thrown.
One word of caution here. Please be careful putting variable data in these messages (e.g., data that varies based on state) as that might end up exposing more information to the site than we are comfortable with. Both from a compatibility/refactoring hazard as well as end user privacy. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform