Extend the Error enum instead of a separate type
The error representing that a vertex is already inserted into the skip-list was represented by the struct AlreadyInseertedElement. Instead of using that struct, extend the memgraph::storage::v3::Error scoped enum and use that to represent the double-insertion error.
This commit is contained in:
@@ -489,6 +489,7 @@ class BoltSession final : public memgraph::communication::bolt::Session<memgraph
|
||||
case memgraph::storage::v3::Error::VERTEX_HAS_EDGES:
|
||||
case memgraph::storage::v3::Error::PROPERTIES_DISABLED:
|
||||
case memgraph::storage::v3::Error::NONEXISTENT_OBJECT:
|
||||
case memgraph::storage::v3::Error::VERTEX_ALREADY_INSERTED:
|
||||
throw memgraph::communication::bolt::ClientError("Unexpected storage error when streaming summary.");
|
||||
}
|
||||
}
|
||||
@@ -523,6 +524,7 @@ class BoltSession final : public memgraph::communication::bolt::Session<memgraph
|
||||
case memgraph::storage::v3::Error::VERTEX_HAS_EDGES:
|
||||
case memgraph::storage::v3::Error::SERIALIZATION_ERROR:
|
||||
case memgraph::storage::v3::Error::PROPERTIES_DISABLED:
|
||||
case memgraph::storage::v3::Error::VERTEX_ALREADY_INSERTED:
|
||||
throw memgraph::communication::bolt::ClientError("Unexpected storage error when streaming results.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user