X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fdatabase%2Fdatabases%2Fclass_LocalFileDatabase.php;h=407aa0d7c1d4145ac1d20f46bc982a47f2b957d0;hb=cd3c1c775e300e64f132c95b6fa46b3fe585fd8e;hp=54b1841dff5966cccca09af25eb08704692c6d17;hpb=4b88c118b615335d06bd74e444173d21aef4406c;p=core.git diff --git a/inc/classes/main/database/databases/class_LocalFileDatabase.php b/inc/classes/main/database/databases/class_LocalFileDatabase.php index 54b1841d..407aa0d7 100644 --- a/inc/classes/main/database/databases/class_LocalFileDatabase.php +++ b/inc/classes/main/database/databases/class_LocalFileDatabase.php @@ -92,18 +92,15 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend * Create an object of LocalFileDatabase and set the save path for local files. * This method also validates the given file path. * - * @param $savePath The local file path string - * @param $ioInstance The input/output handler. This - * should be FileIoHandler - * @return $dbInstance An instance of LocalFileDatabase + * @param $savePath The local file path string + * @return $dbInstance An instance of LocalFileDatabase */ - public static final function createLocalFileDatabase ($savePath, FileIoHandler $ioInstance) { + public static final function createLocalFileDatabase ($savePath) { // Get an instance $databaseInstance = new LocalFileDatabase(); // Set save path and IO instance $databaseInstance->setSavePath($savePath); - $databaseInstance->setFileIoInstance($ioInstance); // Set the compressor channel $databaseInstance->setCompressorChannel(CompressorChannel::createCompressorChannel( @@ -498,10 +495,10 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend } catch (FrameworkException $e) { // Catch all exceptions and store them in last error $this->lastException = $e; - $this->lastError = $e->getMessage(); + $this->lastError = $e->getMessage(); // Throw an SQL exception - throw new SqlException (array($this, sprintf("Cannot write data to table '%s'", $tableName), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY); + throw new SqlException (array($this, sprintf("Cannot write data to table '%s', is the table created?", $dataSetInstance->getTableName()), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY); } } @@ -592,7 +589,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend $this->lastError = $e->getMessage(); // Throw an SQL exception - throw new SqlException (array($this, sprintf("Cannot write data to table '%s'", $dataSetInstance->getTableName()), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY); + throw new SqlException (array($this, sprintf("Cannot write data to table '%s', is the table created?", $dataSetInstance->getTableName()), self::DB_CODE_TABLE_UNWRITEABLE), self::EXCEPTION_SQL_QUERY); } }