Cleanup a bit of exception/error handling between the VM and the debugger

We had two similar-but-different functions for getting a notification from the VM about an exception. Cleaned that up by using the proper one for a thrown exception where appropriate, and moving the old one into a hook (like the other VM->debugger hooks) specifically for error messages.
Esse commit está contido em:
Mike Magruder
2013-06-07 15:12:13 -07:00
commit de sgolemon
commit eec54a0f6c
10 arquivos alterados com 36 adições e 45 exclusões
+2 -7
Ver Arquivo
@@ -617,18 +617,13 @@ void BaseExecutionContext::handleError(const std::string &msg,
handled = callUserErrorHandler(ee, errnum, false);
}
if (mode == AlwaysThrow || (mode == ThrowIfUnhandled && !handled)) {
try {
if (!Eval::Debugger::InterruptException(String(msg))) return;
} catch (const Eval::DebuggerClientExitException &e) {}
DEBUGGER_ATTACHED_ONLY(phpDebuggerErrorHook(msg));
throw FatalErrorException(msg, bt);
}
if (!handled &&
(RuntimeOption::NoSilencer ||
(getErrorReportingLevel() & errnum) != 0)) {
try {
if (!Eval::Debugger::InterruptException(String(msg))) return;
} catch (const Eval::DebuggerClientExitException &e) {}
DEBUGGER_ATTACHED_ONLY(phpDebuggerErrorHook(msg));
String file = empty_string;
int line = 0;
if (RuntimeOption::InjectedStackTrace) {