private function error($error) {
        if($this->logErrors) {
            $file = $this->logLocation.'db-errors.txt';
            $current = file_get_contents($file);
            $current .= date('d/m/Y H:i:s')." ERROR: ".$error->getMessage()." on ".$this->sql."\n";
            file_put_contents($file, $current); 
        }
        die($this->displayErrors ? 'ERROR: '.$error->getMessage().' on '.$this->sql : 0);
    }
private function error($error) {
        if($this->logErrors) {
            $file = $this->logLocation.'db-errors.txt';
            $current = file_get_contents($file);
            $current .= date('d/m/Y H:i:s')." ERROR: ".$error->getMessage()." on ".$this->sql."\n";
            file_put_contents($file, $current); 
        }
        die($this->displayErrors ? 'ERROR: '.$error->getMessage().' on '.$this->sql : 0);
    }
private function error ( $ error ) { if ( $ this -> logErrors ) { $ file = $ this -> logLocation . 'db-errors.txt' ; $ current = file_get_contents ( $ file ) ; $ current .= date ( 'd/m/Y H:i:s' ) . " ERROR: " . $ error -> getMessage ( ) . " on " . $ this -> sql . "\n" ; file_put_contents ( $ file , $ current ) ; } die ( $ this -> displayErrors ? 'ERROR: ' . $ error -> getMessage ( ) . ' on ' . $ this -> sql : 0 ) ; }
Displays the error massage which occurs
@param \Exception $error This should be an instance of Exception
Displays the error massage which occurs