On 30.04.2011 0:22, Axel Rauschmayer wrote:
Would it make sense to standardize more exception/error types, for example to
add a MissingParameterError in ES.next?
No proposal yet for demanding actual parameter count match formal, so this
would not be used.
Right. I would use it when I do my own checking. This idea is mainly motivated
by Java having several predefined exceptions with descriptive names that are
easy to reuse.
With JavaScript, is throwing a string considered bad style (now or in the
future)? That is, is throwing a new Error(msg) better than throwing msg
directly?
Why? In general when you don't need a complex structure of an exception
to analyze, the ability to throw strings IMO is better than Java's
long-long line of WhatAnNiceMidnightOn30OfAprilExceptionIn.
Dmitry.
Axel
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss