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:
@@ -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) {
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário