Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException has no stack trace #562

Closed
jasonvarga opened this issue Feb 8, 2018 · 0 comments
Closed

ErrorException has no stack trace #562

jasonvarga opened this issue Feb 8, 2018 · 0 comments

Comments

@jasonvarga
Copy link

jasonvarga commented Feb 8, 2018

This is basically a duplicate of #424 but that's from 2016.

When throwing an ErrorException, there's no stack trace. I'm not sure if it's a configuration issue, a bug, or something else.

ErrorException, no stack:

image

Exception, Error, etc, has a stack:

image

<?php

require __DIR__.'/vendor/autoload.php';
require 'Example.php';

$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();

$example = new Example;

$example->throwException();      // stack
$example->throwError();          // stack
$example->causeError();          // stack
$example->throwErrorException(); // no stack
<?php

class Example
{
    function throwException() {
        throw new Exception;
    }
    function throwErrorException() {
        throw new ErrorException;
    }
    function throwError() {
        throw new Error;
    }
    function causeError() {
        $foo = null;
        $foo->bar();
    }
}

References: laravel/framework#23083

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant