public function error($msg)
    {
        file_put_contents($this->config['logDir'] . self::LOG_FILE, date('Y-m-d h:m:s') . ' :: ' . $msg . "\n",
            FILE_APPEND);

        // log set as true
        if ($this->log) {
            // show executed query with error
            $this->showQuery();
            // die code
            $this->helper()->errorBox($msg);
        }

        throw new \PDOException($msg);
    }
public function error($msg)
    {
        file_put_contents($this->config['logDir'] . self::LOG_FILE, date('Y-m-d h:m:s') . ' :: ' . $msg . "\n",
            FILE_APPEND);

        // log set as true
        if ($this->log) {
            // show executed query with error
            $this->showQuery();
            // die code
            $this->helper()->errorBox($msg);
        }

        throw new \PDOException($msg);
    }
public function error ( $ msg ) { file_put_contents ( $ this -> config [ 'logDir' ] . self :: LOG_FILE , date ( 'Y-m-d h:m:s' ) . ' :: ' . $ msg . "\n" , FILE_APPEND ) ; // log set as true if ( $ this -> log ) { // show executed query with error $ this -> showQuery ( ) ; // die code $ this -> helper ( ) -> errorBox ( $ msg ) ; } throw new \ PDOException ( $ msg ) ; }
Catch Error in txt file.

@param mixed $msg
Catch Error in txt file .