Does anyone know a good exception and error handling strategy. Right now I have different pieces of code handling their own check / error / exception, but I would really have a centralized strategy. I was thinking of some kind of global notification system that passes some errors / exceptions to the user, such as checking. Other errors that I could post in my back-end and register them.
For example, a validation error may contain the element that caused the error. That way I can add a class to highlight it and add text before or after.
So, if anyone has concrete examples of how to do this, I would really appreciate it.
source
share