Proposal: Lazy Error.message

Augusto Moura augusto.borgesm at gmail.com
Sun May 12 20:05:28 UTC 2019


Also, there's nothing preventing subclasses of Error to return a
function as message (or any other complex object). In chrome you can
also reassign a function to a existing error message, I didn't tested
others browsers. User interfaces/libraries can check if a message is a
function or not (giving your link to commonjs-assert I assume it was
your first idea)

Em sáb, 11 de mai de 2019 às 08:55, _ zaoqi <zaomir at outlook.com> escreveu:
>
> Allow Error.prototype.message to be a Function
>
> It is useful in this case:
>
> https://github.com/browserify/commonjs-assert/pull/47
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



-- 
Atenciosamente,

Augusto Borges de Moura


More information about the es-discuss mailing list