refactoring the errorHandler. Also using it in GenericMapper

Refacoring GenericErrorHandler and corresponding Interface
Using the same from GenericMapper.