From 187da7f9100560421aadc78a4c03bbfa6cf12663 Mon Sep 17 00:00:00 2001 From: Matija Santl Date: Mon, 22 Oct 2018 09:26:44 +0200 Subject: [PATCH] Change unique constraint error message Summary: As Tom requested in the #graphileon slack channel, I changed the error message when node can't be updated. Reviewers: mferencevic, ipaljak Reviewed By: ipaljak Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1687 --- src/database/single_node/graph_db_accessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/database/single_node/graph_db_accessor.cpp b/src/database/single_node/graph_db_accessor.cpp index 575589907..80fdbaed9 100644 --- a/src/database/single_node/graph_db_accessor.cpp +++ b/src/database/single_node/graph_db_accessor.cpp @@ -200,7 +200,7 @@ void GraphDbAccessor::PopulateIndex(const LabelPropertyIndex::Key &key) { if (!db_.storage().label_property_index_.UpdateOnLabelProperty( vertex.address(), vertex.current_)) { throw IndexConstraintViolationException( - "Index couldn't be populated due to constraint violation!"); + "Index couldn't be created due to constraint violation!"); } } } @@ -214,7 +214,7 @@ void GraphDbAccessor::UpdateLabelIndices(storage::Label label, if (!db_.storage().label_property_index_.UpdateOnLabel(label, vlist_ptr, vertex)) { throw IndexConstraintViolationException( - "Index couldn't be updated due to constraint violation!"); + "Node couldn't be updated due to index constraint violation!"); } db_.storage().labels_index_.Update(label, vlist_ptr, vertex); } @@ -226,7 +226,7 @@ void GraphDbAccessor::UpdatePropertyIndex( if (!db_.storage().label_property_index_.UpdateOnProperty( property, vertex_accessor.address(), vertex)) { throw IndexConstraintViolationException( - "Index couldn't be updated due to constraint violation!"); + "Node couldn't be updated due to index constraint violation!"); } }