mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-09 16:57:53 +01:00
fixed exception.
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
namespace yii\db\sqlite;
|
||||
|
||||
use yii\db\Exception;
|
||||
use yii\base\InvalidParamException;
|
||||
use yii\base\NotSupportedException;
|
||||
use yii\base\InvalidCallException;
|
||||
|
||||
/**
|
||||
* QueryBuilder is the query builder for SQLite databases.
|
||||
@@ -50,7 +50,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
|
||||
* the next new row's primary key will have a value 1.
|
||||
* @return string the SQL statement for resetting sequence
|
||||
* @throws InvalidCallException if the table does not exist or there is no sequence associated with the table.
|
||||
* @throws InvalidParamException if the table does not exist or there is no sequence associated with the table.
|
||||
*/
|
||||
public function resetSequence($tableName, $value = null)
|
||||
{
|
||||
@@ -70,9 +70,9 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
} elseif ($table === null) {
|
||||
throw new InvalidCallException("Table not found: $tableName");
|
||||
throw new InvalidParamException("Table not found: $tableName");
|
||||
} else {
|
||||
throw new InvalidCallException("There is not sequence associated with table '$tableName'.'");
|
||||
throw new InvalidParamException("There is not sequence associated with table '$tableName'.'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user