Use chassert

This commit is contained in:
Antonio Andelic 2022-09-29 07:06:18 +00:00
parent 3109ce51c6
commit bcefa6e62a

View File

@ -437,9 +437,7 @@ void ZooKeeperErrorResponse::writeImpl(WriteBuffer & out) const
void ZooKeeperMultiRequest::checkOperationType(OperationType type)
{
if (operation_type.has_value() && *operation_type != type)
throw Exception("Illegal mixing of read and write operations in multi request", Error::ZBADARGUMENTS);
chassert(!operation_type.has_value() || *operation_type == type);
operation_type = type;
}