Hey guys, I'm trying to create .db file for my Battleground plugin but it say error. Can you help me for the problem? PHP: try { if (!is_file($this->getDataFolder() . "BR_sign.db")) { $this->db = new \SQLite3($this->getDataFolder() . "BR_sign.db", SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); } else { $this->db = new \SQLite3($this->getDataFolder() . "BR_sign.db", SQLITE3_OPEN_READWRITE); } $this->db->exec("CREATE TABLE IF NOT EXISTS signs (arena TEXT PRIMARY KEY COLLATE NOCASE, x INTEGER , y INTEGER , z INTEGER, world TEXT);"); } catch (\Exception $e) { $this->getLogger()->critical($e->getMessage() . ' in §b' . $e->getFile() . '§c on line §b' . $e->getLine()); $this->getServer()->getPluginManager()->disablePlugin($this); }
The error come from this code: PHP: } catch (\Exception $e) { $this->getLogger()->critical($e->getMessage() . ' in §b' . $e->getFile() . '§c on line §b' . $e->getLine()); $this->getServer()->getPluginManager()->disablePlugin($this); }
please dont try catch is there for a reason removing try catch wont make the error clearer maybe vardumping the exception will also paste the error not where it was but FULL error and traces