Comment #3 on issue 1359 by [email protected]: ES53 prematurely casts thrown
objects to strings
http://code.google.com/p/google-caja/issues/detail?id=1359
+1 to remove the behavior where the exception is silently cast to string.
The question is what should happen instead:
Choice 1. Guest code can (a) catch only exceptions which they throw
explicitly or (b) those that cause to be thrown implicitly except for a
blacklist exceptions such as out-of-memory and stack-overflow or (c) all
exceptions
Choice 2. The exception is (a) frozen or (b) unmodified
Notes:
1(a) is a poor choice in practice since existing js code often relies on
catching dom exceptions at the very least.
1(b) and 2(a) is unimplementable on SES.
I suggest we adopt 1(b) and 2(b).