- ASSERT(exceptionValue);
-
- globalData->exception = JSValue();
- HandlerInfo* handler = globalData->interpreter->throwException(callFrame, exceptionValue, vPCIndex); // This may update callFrame & exceptionValue!
- globalData->exception = exceptionValue;
+ if (Options::breakOnThrow()) {
+ dataLog("In call frame ", RawPointer(callFrame), " for code block ", *callFrame->codeBlock(), "\n");
+ CRASH();
+ }
+
+ Exception* exception = vm->exception();
+ RELEASE_ASSERT(exception);
+ VMEntryFrame* vmEntryFrame = vm->topVMEntryFrame;
+ HandlerInfo* handler = vm->interpreter->unwind(vmEntryFrame, callFrame, exception); // This may update vmEntryFrame and callFrame.