private function logError($ex)
 {
     if (is_a($ex, dbException)) {
         $dbh = Connection::get();
         // transakcia padla takze treba rollback
         // inac by spadlo aj toto pridanie dokonca bez hlasky
         $dbh->transactionRollback();
     }
     // maly hack, nasimulujem pridanie pripomienky
     $chyba = new Suggestions();
     // nastavime pozadovane parametre
     $chyba->id_pedagog = $this->controller->getUserID();
     $chyba->pripomienka_typ_id = 1;
     // chyba v systéme
     $chyba->stav = 1;
     // nova
     $chyba->text = "Exception: {$ex->backtrace[0]['class']}\n" . "Message: {$ex->getMessage()}\n";
     if (isset($ex->backtrace)) {
         foreach ($ex->backtrace as $backtrace) {
             $chyba->text .= "{$backtrace['file']} ({$backtrace['line']}) : ";
             $chyba->text .= "{$backtrace['class']} -> {$backtrace['function']}\n";
         }
     }
     $chyba->save($this->controller->getUserID());
     $notifikator = new Notificator();
     $notifikator->setController($this->controller);
     $notifikator->sendSuggestionAddedMsg($chyba);
 }