From df27b8477deffeb717da0da3f7c307a81ddf6d1f Mon Sep 17 00:00:00 2001 From: Matej Ferencevic Date: Wed, 1 Jul 2020 10:20:02 +0200 Subject: [PATCH] Remove unused `UnwrapDegreeResult` function Reviewers: jseljan Reviewed By: jseljan Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2797 --- src/query/plan/operator.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/query/plan/operator.cpp b/src/query/plan/operator.cpp index 0086506ae..9971146de 100644 --- a/src/query/plan/operator.cpp +++ b/src/query/plan/operator.cpp @@ -745,24 +745,6 @@ std::vector ExpandVariable::ModifiedSymbols( namespace { -size_t UnwrapDegreeResult(storage::Result maybe_degree) { - if (maybe_degree.HasError()) { - switch (maybe_degree.GetError()) { - case storage::Error::DELETED_OBJECT: - throw QueryRuntimeException("Trying to get degree of a deleted node."); - case storage::Error::NONEXISTENT_OBJECT: - throw query::QueryRuntimeException( - "Trying to get degree from a node that doesn't exist."); - case storage::Error::SERIALIZATION_ERROR: - case storage::Error::VERTEX_HAS_EDGES: - case storage::Error::PROPERTIES_DISABLED: - throw QueryRuntimeException( - "Unexpected error when getting node degree."); - } - } - return *maybe_degree; -} - /** * Helper function that returns an iterable over * pairs