I'm running into an...irritation, I guess...with a custom error handler in the application I work with, and I'm hoping someone here can offer some insight.
As part of the data aggregation for our site, custom spiders and parsers are built on an individual basis outside of our codebase. They're stored in the database and run via eval inside of a gearman process.
There's a custom error handler set up that inserts the ID number of the company being run if there's an error (like if a delimiter is forgotten in a regular expression, or there's a divide by zero error when I haven't had my coffee). For the most part, this error handler works great.
However, I've noticed that if there is an unterminated comment in the eval'd code, the error handler isn't used, so the php error logs don't contain the ID number of the company with the issue.
We handle the following error types in the handler
- E_WARNING
- E_USER_WARNING
- E_ERROR
- E_USER_ERROR
The logs state that the comment string error is 'Warning', so I don't know why the custom hanlder isn't being invoked.
Any thoughts?