Example #1
0
 /**
  * Handle an error message
  *
  * @param string $method
  * @param string $error
  * @throws DatabaseException
  */
 protected function error(string $method, string $error)
 {
     $this->errors[] = $error;
     if (property_exists($this, "lastQuery") && is_object($this->lastQuery)) {
         if (property_exists($this->lastQuery, "error")) {
             $this->lastQuery->error = $error;
         }
     }
     if (!$this->config->silentMode) {
         throw DatabaseException::queryError($method, $error);
     }
 }