darsain / laravel-console

In-browser console for Laravel PHP framework.
170 stars 44 forks source link

Error handling #13

Closed darsain closed 11 years ago

darsain commented 11 years ago

Catching all error types in this environment is just a nightmare.

Console needs to catch an error, put it into a profile with:

$profile = Darsain\Console\Console::getProfile(array(
  'error' => $error
));

And return the $profile object as JSON back to the client with 200 Status Code.

I was just not able to accomplish that. Barely kept my legs from breaking from all the logs thrown at them.

Error types to catch and properly handle:

The core files responsible for execution are (really simple, just 2 classes with a couple of methods):

sp0tteh commented 11 years ago

Hey , thanks for this. Will check it out soon.

darsain commented 11 years ago

It feels hacky, but I think this might work.

darsain commented 11 years ago

None's complaining, seems to work well with everything I could throw at it ... I guess I'm gonna close this as fixed :)