CatchExceptionx for 4×x errors only

9 months ago

josef.sabl
Backer | 152
+
0
-

My problem is as follows:

For localhost development I obviously have Tracy enabled and it catches all the errors and displays the red screen of death. So far so good.

But as application also fires 4×x errors (particularly 404 for invalid URLs and 403 for a non-authenticated user) these errors are handled by Tracy as well. The problem is these features are part of the application and I need to debug them without Tracy interfering.

E.g. 404 displays some relevant info and features for the user to see (“Did you mean?” feature) and 403 redirects user to the login form.

The solution is to go to config and set catchExceptions: yes. But it is pretty annoying to do it every time I am logged out and need to re-authenticate. It is also confusing for new people on the team which sometimes spend some time looking for a problem if I forget to mention this nuisance.

Is there a better solution?

9 months ago

David Grudl
Nette Core | 6849
+
+1
-

Is it related to this? https://github.com/…tion/pull/63

9 months ago

josef.sabl
Backer | 152
+
0
-

David Grudl wrote:

Is it related to this? https://github.com/…tion/pull/63

Yes, it is exactly my problem. Thank you!

9 months ago

josef.sabl
Backer | 152
+
0
-

As the referenced pull request got never resolved, this problem seems to be still valid. Just saying :-)