Conditional catch clause

Brendan Eich brendan at mozilla.com
Wed Dec 19 20:01:38 PST 2012


John J Barton wrote:
> Debuggers provide break-on-exception as a valuable development 
> feature. Why? Because developers know that an exception is something 
> the merits special attention.  If we want to invest in throw/catch we 
> should provide features like runtime detection of would-be-caught.

You seem to be assuming debuggers are the tail that wags the dog, and 
exceptions are only errors that one must debug. Neither is true.

Debuggers must look inside of closures and get backstage-passes from the 
GC. They must bear many burdens for the good of the user. Any debugger 
worth using must be able to stop-on-only-*these*-exceptions, classifying 
by instance, instanceof/"class", duck-type or other criteria.

/be


More information about the es-discuss mailing list