public function errorAction()
 {
     parent::errorAction();
     $error = $this->_errSrv->createError($this->_exception);
     if (!empty($this->_errorMessages)) {
         $errMess = array();
         foreach ($this->_errorMessages as $key => $err) {
             if ($err instanceof ModelAbstract) {
                 $err = $err->exportData();
             }
             $errMess[$key] = $err;
         }
         $error->description .= "\n[JSON]\n" . Zend_Json::encode($errMess) . "\n[\\JSON]\n";
     }
     if (!empty($this->_validationErrors)) {
         $errors = array();
         foreach ($this->_validationErrors as $key => $msg) {
             $this->_getValidationErrorRec($key, $msg, $errors);
         }
         $error->description .= "\n[JSON]\n" . Zend_Json::encode($errors) . "\n[\\JSON]\n";
     }
     $data = $this->_mapError($error);
     if ($error->fault->code === \External\Model\Error\FaultModel::FAULT_CODE_CLIENT) {
         $this->view->ClientException = $data;
     } else {
         $this->view->ServerException = $data;
     }
 }
 public function init()
 {
     $this->_errSrv = ErrorService::getInstance();
 }