Shows the errors/production view and exits.  This only gets
called when an error occurs in production mode.

@return  void
330008
public static function show_production_error(\Exception $e)
	{
		// when we're on CLI, always show the php error
		if (\Fuel::$is_cli)
		{
			return static::show_php_error($e);
		}

		if ( ! headers_sent())
		{
			$protocol = \Input::server('SERVER_PROTOCOL') ? \Input::server('SERVER_PROTOCOL') : 'HTTP/1.1';
			header($protocol.' 500 Internal Server Error');
		}
		exit(\View::forge('errors'.DS.'production'));
	}
1217547
protected function renderError()
    {
        $errMessage = $this->errMessage;
        $errFile = $this->errFile;
        $errLine = $this->errLine;

        \ob_start();
        require __DIR__ . '/templates/trace.error.phtml';

        return \ob_get_clean();
    }
509887
private function reportErrors()
    {
        if ( ! $this->errorReporting)
        {
            return;
        }

        set_error_handler([get_class(), 'errorHandler']);

        if ( ! empty($this->errors))
        {
            $this->isBufferReturned = true;
        }

        foreach ($this->errors as $error)
        {
            trigger_error($error->getMessage(), $error->getLevel());
        }

        restore_error_handler();
    }
101419
public function error() {
        $error = $this->request->url(2);
        $error_layout = Config::get('Error.layout');
        $this->view->setLayout($error_layout ? $error_layout : 'error');
        
        if ( in_array($error, [500, 404]) ) {
            $this->response->defaultHeader($error);
            $this->view->setTemplate( is_file(PO_PATH_TEMPLATES . DS . 'error' . DS . 'error-' . $error . '.phtml') ? 
                    'error-' . $error : 'default', 'error');
        } else {
            $this->view->setTemplate('default', 'error');
        }
    }
939735
private function route() : void
    {
        // Parse route
        $parsed = $this->parseRoute();

        // Run error controller when no route matched
        if (!$parsed && isset($this->error_controller)) {
            call_user_func($this->error_controller);
        }
    }
960423
private function logOverviewErrors(): void
  {
    if (!empty($this->errorFilenames))
    {
      $this->io->warning('Routines in the files below are not loaded:');
      $this->io->listing($this->errorFilenames);
    }
  }
630331
public function displayValidRoutesAction()
    {
        $this->di->views->add('default/error-routes', [
          'route'           => $this->di->request->getRoute(),
          'routes'          => $this->di->router->getAll(),
          'internalRoutes'  => $this->di->router->getInternal(),
          'controllers'     => $this->di->getControllers(),
        ]);
    }
302702
public function fatalHandler() : void
    {
        $errors = error_get_last();
        if (is_array($errors)) {
            $this->setError(
               (int) $errors['type'],
                (string) $errors['message'],
                (string) $errors['file'],
                (int) $errors['line'],
                'FatalErrorException'
            );

            View::render('500.php', (object) $this->errors);

            return;
        }
    }
117306
public function output()
    {
        // If the view file exists
        if ($this->hasFile()) {
            // Extract all view variables
            extract($this->getVars());
            ob_start();
            include($this->getPath() . '/' . $this->getFile(true));
            $html = ob_get_contents();
            ob_end_clean();
            return $html;
        } else {
            die('Fatal Error: ' . $this->getPath() . '/' . $this->getFile(true) . ' does not exist.');
        }
    }
1048436
protected function registerErrorViewPaths()
    {
        $paths = collect(config('view.paths'));

        View::replaceNamespace('errors', $paths->map(function ($path) {
            return "{$path}/errors";
        })->push(__DIR__.'/views')->all());
    }
394651
private function check_errors() {
 	 	switch($this->db['phptype']) {
 	 		case "sqlite":
				if ($this->sqlite_version == 3) {
					$this->errno = $this->conn->lastErrorCode();
					$this->error = $this->conn->lastErrorMsg();
				} else {
					$this->errno = sqlite_last_error($this->conn);
					$this->error = sqlite_error_string($this->errno);
				}
 	 			break;
 	 		case "mysql":
 	 			$this->errno = mysql_errno($this->conn);
 	 			$this->error = mysql_error($this->conn);
 	 			break;
 	 		case "mysqli":
				if (mysqli_connect_error()) {
					die('Connect Error: ' . mysqli_connect_error());
				}
 	 			$this->errno = mysqli_errno($this->conn);
 	 			$this->error = mysqli_error($this->conn);
 	 			break;
 	 	}

 	}
1319165
protected function dumpViews()
    {
        $this->tables->execute();

        foreach ($this->tables->fetchAll(\PDO::FETCH_ASSOC) as $a) {
            $view = current($a);

            if (!isset($a['Table_type']) || $a['Table_type'] !== 'VIEW') {
                continue;
            }

            if (in_array($view, (array) $this->config->ignore, true)) {
                continue;
            }

            if ((string) $this->config->prefix !== '' && strpos($view, $this->config->prefix) !== 0) {
                continue;
            }

            $structure = $this->pdo->query('SHOW CREATE VIEW `'.$view.'`');

            if ($structure = $structure->fetch(\PDO::FETCH_ASSOC)) {
                if (isset($structure['Create View'])) {
                    $this->write("\n-- Structure for view `{$view}`\n", false);
                    $this->write('DROP VIEW IF EXISTS `'.$view.'`');
                    $this->write($structure['Create View']);
                }
            }
        }
    }
1239620
public function actionError()
    {
        $error = array();
        if (!empty(Yii::app()->errorHandler->error))
            $error=Yii::app()->errorHandler->error;
        
        $this->render('error', array('error' => $error));
    }
32111
private function makeViews()
    {

        foreach ($this->views as $view) {
            // index, create, show, edit
            new MakeView($this, $this->files, $view);
        }


        $this->info('Views created successfully.');

        $this->info('Dump-autoload...');
        $this->composer->dumpAutoloads();

        $this->info('Route::resource("'.$this->getObjName("names").'","Admin\\'.$this->getObjName("Name").'Controller"); // Add this line in routes.php');

    }
1357020
public function renderOut()
    {
        foreach (Error::all() as $file => $error) {
            foreach ($error as $line) {
                $this->addMessage('Template error: ' . $line . '(' . $file . ')', 'error');
            }
        }
        return $this->render->render();
    }
964164
public function errorLogger()
    {
        switch ($this->commMethod) {
            case 'liveupdate':
                $orderId = $this->formData['ORDER_REF'];
                $type = "LiveUpdate";
                break;
            case 'backref':
                $orderId = $this->order_ref;
                $type = "BackRef";
                break;
            case 'ios':
                $orderId = $this->orderNumber;
                $type = "IOS";
                break;
            case 'ipn':
                $orderId = @$this->postData['REFNOEXT'];
                $type = "IPN";
                break;
            case 'idn':
                $orderId = $this->refnoext;
                $type = "IDN";
                break;
            case 'irn':
                $orderId = $this->refnoext;
                $type = "IRN";
                break;
            case 'timeout':
                $orderId = $this->order_ref;
                $type = "TIMEOUT";
                break;
            case 'oneclick':
                $orderId = $this->formData['EXTERNAL_REF'];
                $type = "OneClick";
                break;
            case 'alu':
                $orderId = $this->formData['ORDER_REF'];
                $type = "ALU";
                break;

            default:
                $orderId = 'EMPTY';
                $type = 'general';
                $this->debugMessage[] = 'DEBUG_LOGGER_UNDEFINED_ID: ' . $orderId;
                $this->debugMessage[] = 'DEBUG_LOGGER_UNDEFINED_TYPE: ' . $type;
                break;
        }

        $errorCounter = count($this->errorMessage);

        $log = array();
        if ($this->debug || $errorCounter > 0) {
            $counter = 1;
            foreach ($this->debugMessage as $item) {
                $log['ITEM_' . $counter] = $item;
                $counter++;
            }
            $this->logFunc($type . '_DEBUG', $log, $orderId);
        }

        $log = array();
        if ($errorCounter > 0) {
            $counter = 1;
            foreach ($this->errorMessage as $item) {
                $log['ITEM_' . $counter] = $item;
                $counter++;
            }
            $this->logFunc($type . '_ERROR', $log, $orderId);
        }
    }
613883
protected function validateRun()
    {
        $status = $this->process->getExitCode();
        $error  = $this->process->getErrorOutput();

        if ($status !== 0 and $error !== '') {
            throw new \RuntimeException(
                sprintf(
                    "The exit status code %s says something went wrong:\n stderr: %s\n stdout: %s\ncommand: %s.",
                    $status,
                    $error,
                    $this->process->getOutput(),
                    $this->command
                )
            );
        }
    }