public function effect()
{
$classification = $this->classification();
switch ($classification) {
case 'ClientError':
return Neo4jExceptionInterface::EFFECT_ROLLBACK;
case 'ClientNotification':
return Neo4jExceptionInterface::EFFECT_NONE;
case 'DatabaseError':
return Neo4jExceptionInterface::EFFECT_ROLLBACK;
case 'TransientError':
return Neo4jExceptionInterface::EFFECT_ROLLBACK;
default:
throw new \InvalidArgumentException(sprintf('Invalid classification "%s" in "%s"', $classification, $this->getMessage()));
}
}