So for warnings and deprecations, we convert them to ErrorException:
ini_set('display_errors', 'Off'); // @mago-expect lint:no-ini-set
set_exception_handler($handler->handle(...));
set_error_handler(function (int $code, string $message, string $filename, int $line) use ($handler): bool {
$handler->handle(new ErrorException(
message: $message,
code: $code,
filename: $filename,
line: $line,
));
return true;
});
So they get reported by the error handler. However, these exceptions aren't actually thrown, so it's super confusion to get a exception page, but then not being able to catch it.
So for warnings and deprecations, we convert them to ErrorException:
So they get reported by the error handler. However, these exceptions aren't actually thrown, so it's super confusion to get a exception page, but then not being able to catch it.