formapro/BadaBoom — Issue #29: [rfc] Filter for particular exception raised
Author: smileua
Created: 2011-12-10 16:55:27+00:00
State: open

Using the https://github.com/makasim/fpErrorNotifierPlugin I drew conclusion it would be great to suppress some particular errors. It's hard to fix some kind of exceptions if not possible at all. Those exceptions are not fatal and affect nothing. Well, I know it sounds quite strange, but I do really want to drop some exceptions to avoid spamming our devs' emails with not relevant notifications.

Well, here I'm going to propose the way to identify particular exceptions. Just an exception class name https://github.com/formapro/BadaBoom/blob/master/src/BadaBoom/ChainNode/Filter/ExceptionClassFilter.php is not enough. I suppose information like **generateCacheId** at https://github.com/formapro/BadaBoom/blob/master/src/BadaBoom/ChainNode/Filter/DuplicateExceptionFilter.php#L51 should be used as id.
I see it in following way. There is filter class, for example, ExceptionHashFilter. It configured with a collection of hashes. Directly in the code or via config.
But here I see some drawbacks. **generateCacheId** is a function of file and line. Well, if the code changed therefore hash of the same exception would change too.

Btw, it would be great to add exception hash to email notifications, I suppose. It would useful to filter those notifications on client side.