Skip to content

ErrorException in callbacks#376

@ghost

Description

Hi,

maybe I don't understand the concept of reactPHP not well enough. But if I use the functions

error_reporting(0); set_error_handler([$this, 'handle'], E_ALL); set_exception_handler([$this, 'exception']); register_shutdown_function([$this, 'shutdown']); 

I thought that they will work inside the callback too. Every typo returns a HTTP 500 in the exmple react/http. It would be much more easier if there would be an ErrorException for E_ERROR, E_WARNING ect. like

function handle($code, $text, $file, $line){throw new \ErrorException($text, $code, 1, $file, $line)} 

Or how can I do that myself?

Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions