Skip to content

Warnings and deprecations get converted to uncatchable ErrorExceptions #2124

@brendt

Description

@brendt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions