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

Treating ErrorException as a typical exception is not a good strategy #28

Closed
adlawson opened this issue Nov 4, 2013 · 1 comment
Closed

Comments

@adlawson
Copy link

adlawson commented Nov 4, 2013

Using ErrorException to manage the data is fine, but then treating it as if it was a normal Exception is not.

Take the stack trace, for instance.
It does not make sense to persist the trace from the moment the ErrorException is created. This is redundant data. It also means that any info about line numbers is not persisted. $e->getLine() is not used anywhere despite it being the only place the error line is kept.

I can only deduce from this library that this is a service that was built only to handle exceptions correctly and hasn't been tested fully.

Along with a few other issues with the lib (including session monkeypatching), is there a plan to revisit this lib to make it a stable dependency, or should we write our own?

@CmdrKeen
Copy link
Contributor

CmdrKeen commented Nov 4, 2013

Hi Andrew,

Thanks for the feedback. I'm keen to hear a bit more about the service example you're referencing. To be honest, we have a bunch of PHP experience but it's a little on the rusty side so there is a chance things could be tightened up in places. We're very much open to accepting pull requests if you wanted to suggest some changes (rather than needing to write your own).

I'm curious about the line numbers because I'm certainly getting line numbers that relate to the crash in my stack traces from my PHP based sites. There probably could be some improvements around efficiency (with regards to your comment about redundant data).

With regards to the session tracking, we shifted to a cookie approach to make life easier with other frameworks, so I don't think that should be an issue any longer, but let me know.

As mentioned, I appreciate the feedback and hope you'll join in improving the library for everyone. Thanks!

@fundead fundead closed this as completed Jan 27, 2016
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