mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Use chassert
This commit is contained in:
parent
3109ce51c6
commit
bcefa6e62a
@ -437,9 +437,7 @@ void ZooKeeperErrorResponse::writeImpl(WriteBuffer & out) const
|
|||||||
|
|
||||||
void ZooKeeperMultiRequest::checkOperationType(OperationType type)
|
void ZooKeeperMultiRequest::checkOperationType(OperationType type)
|
||||||
{
|
{
|
||||||
if (operation_type.has_value() && *operation_type != type)
|
chassert(!operation_type.has_value() || *operation_type == type);
|
||||||
throw Exception("Illegal mixing of read and write operations in multi request", Error::ZBADARGUMENTS);
|
|
||||||
|
|
||||||
operation_type = type;
|
operation_type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user