N98\Util\Console\Helper\DatabaseHelper::throwRuntimeException PHP Method

throwRuntimeException() private method

throw a runtime exception and provide error info for the statement if available
private throwRuntimeException ( PDOStatement $statement, string $message = "" )
$statement PDOStatement
$message string
    private function throwRuntimeException(PDOStatement $statement, $message = "")
    {
        $reason = $statement->errorInfo() ? vsprintf('SQLSTATE[%s]: %s: %s', $statement->errorInfo()) : 'no error info for statement';
        if (strlen($message)) {
            $message .= ': ';
        } else {
            $message = '';
        }
        throw new RuntimeException($message . $reason);
    }