Command-line jsc's exception handling should be rationalized
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Apr 2012 20:50:50 +0000 (20:50 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Apr 2012 20:50:50 +0000 (20:50 +0000)
commit64f7aa1abd71cfab92a54e4c3cf7314170e74d77
treedabdb35f26b8b3f52d9cb2e61db2133345d5481e
parent3cb7e2c7410f594ccd492b4a29f6f8f4a5e9b3cf
Command-line jsc's exception handling should be rationalized
https://bugs.webkit.org/show_bug.cgi?id=83437

Reviewed by Dan Bernstein.

- If an exception is thrown during run() execution, it is now propagated,
  so that it will terminate program execution unless it is caught.

- If program execution terminates with an exception, the exception is now
  always printed.

- When printing the exception, the backtrace is now also printed if one is
  available. It will only not be available if you use something akin to my
  favorite line of code, 'throw "error"', since primitives don't have
  properties and hence we cannot attach a "stack" property to them.

* jsc.cpp:
(functionRun):
(runWithScripts):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jsc.cpp