Hello,
Does anybody know a good strategy for handling exceptions and errors. At the moment I have different pieces of code handling their own validation/errors/exception but I would really have a centralized strategy. I was thinking of some global notification system that passes some errors/exceptions to the user like validation. Other errors I would post to my back-end and log them.
For example a validation error could contain the element that caused the error. That way I can add a class to highlight it and append some text before or after.
So if anybody has some concrete examples on how to do this I would really appreciate it.