added errorHandler to the class.