Factorized some code

_error function in controller class is not abstract anymore.