public function initialize()
{
/** @var \Phalcon\Error\Error $error */
$error = $this->dispatcher->getParam('error');
if (!$error instanceof Error) {
$error = new Error(['type' => -1, 'message' => 'Something is not quite right', 'file' => __FILE__, 'line' => __LINE__, 'exception' => null, 'isException' => false, 'isError' => true]);
}
$this->error = $error;
$this->view->setVars(['error' => $this->error, 'debug' => ENV_DEVELOPMENT === APPLICATION_ENV || ENV_TESTING === APPLICATION_ENV]);
}