private function statementWrapper(\PDOStatement $statement, $log_message = null)
    {
        if ($log_message === null) {
            $log_message = "Statement execution error: ";
        }
        
        try {
            $statement->execute();
        } catch (\PDOException $pdo_e) {
            $context = array();

            $context["exception"] = $pdo_e;

            $this->updateLog("error", "{$log_message}: {message}", $context);

            return false;
        }

        $result = $statement->fetchAll(\PDO::FETCH_ASSOC);
        
        return $result;
    }