This is Google's cache of https://github.com/filp/whoops/issues/162. It is a snapshot of the page as it appeared on Mar 13, 2024 01:01:18 GMT. The current page could have changed in the meantime. Learn more.
Full versionText-only versionView source
Tip: To quickly find your search term on this page, press Ctrl+F or ⌘-F (Mac) and use the find bar.
Whoops pages stopped displaying for errors in some pages · Issue #162 · filp/whoops · GitHub
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

Whoops pages stopped displaying for errors in some pages #162

Closed
goharsahi opened this issue Feb 23, 2014 · 14 comments
Closed

Whoops pages stopped displaying for errors in some pages #162

goharsahi opened this issue Feb 23, 2014 · 14 comments

Comments

@goharsahi
Copy link

I'm using Laravel 4.1 and Whoops pages were working perfectly for me, when all of a sudden, it stopped displaying errors in certain pages in the middle of programming, however, for some pages, it still shows errors, e.g. if I make a deliberate mistake in app.php, routes.php, views.php etc... it does show whoops page, however, certain other pages like, filters.php, config/auth.php, contollers/, views/, models and most others, it stopped displaying errors. Just shows white screen.

However, it is logging all the errors in laravel.log file along will whole stack trace and time etc. This has happened to me second time. Any guess?

@denis-sokolov
Copy link
Collaborator

To begin with, could you let me know the version of Whoops you are using?

@goharsahi
Copy link
Author

I don't know how to check the version. I just installed Laravel 4.1 a week back.

@denis-sokolov
Copy link
Collaborator

That's okay. It means you are using Whoops 1.0.10.
There are no known issues that resemble anything like you tell.

If you would be willing to debug this, I could guide you on what to do.
To begin with, it seems that the Whoops is not being registered as a handler at some point in the runtime of your application. Could you play search around, see if anything in your application does anything with set_error_handler or restore_error_handler?

@goharsahi
Copy link
Author

your help is much appreciated. I'll look around. In the meanwhile, I've pasted the stack trace of last error, not displayed by whoops. http://laravel.io/bin/Y2V6

where can I find set_error_handler? I'm just a couple of months into frameworks as such.

@goharsahi
Copy link
Author

ok, found quite a few instances of set_error_handler

E:\My Data\htdocs\laravel4\compliance\vendor\filp\whoops\src\Whoops\Run.php:
110 class_exists("\Whoops\Exception\Inspector");
111
112: set_error_handler(array($this, self::ERROR_HANDLER));

@goharsahi
Copy link
Author

To give you further insight, this is precisely what I was coding when the whoops pages first disappeared.

http://laravel.io/bin/mWxq

Wonder anything wrong I did here thats a no no in laravel 4.

@denis-sokolov
Copy link
Collaborator

I'm sorry, after reviewing everything, I'm no closer to the solution.
I am afraid this is something misconfigured in your project and you'll have to solve it on your own, unless you manage to provide exact steps to reproduce the problem on a fresh installation of Laravel. :(

@goharsahi
Copy link
Author

Ok, I'll try to do that and get back to you. Thanks for your time and help.

@goharsahi
Copy link
Author

i've finally traced the issue. I had following code in my routes.php.

App::error(function(NotFoundHttpException $e)
{
    return View::make('Not Found', 404);
});

@denis-sokolov
Copy link
Collaborator

Ah, so you have installed your own error handler, I see.
I am glad that you have found the issue!

@Anahkiasen
Copy link
Contributor

Well that makes sense no, if you catch the Exception, then there's no reason for Whoops to trigger is there ?

@goharsahi
Copy link
Author

Actually, like I mentioned, I'm still new to Laravel. And I didn't know how whoops operates. Thats one step up the learning curve though.

Another thing I found though. I've got this code in app/start/global.php

App::error(function(Exception $exception, $code)
{
    Log::error($exception);
});

And then I have this another piece in my routes.php

App::error(function(Exception $e)
{
    Log::error($e);
});

Isn't this redundancy?

@denis-sokolov
Copy link
Collaborator

I think you should really seek some help on Laravel about this.

@goharsahi
Copy link
Author

ok, thanks alot for your help and time. .

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

3 participants