Commit da533495 by Jakob Pfender Committed by Vicent Marti

hashtable.c: Move to new error handling mechanism

parent d3ca89fe
...@@ -110,7 +110,7 @@ static int node_insert(git_hashtable *self, git_hashtable_node *new_node) ...@@ -110,7 +110,7 @@ static int node_insert(git_hashtable *self, git_hashtable_node *new_node)
} }
if (self->is_resizing) if (self->is_resizing)
return GIT_EBUSY; return git__throw(GIT_EBUSY, "Failed to insert node. Hashtable is currently resizing");
resize_to(self, self->size * 2); resize_to(self, self->size * 2);
git_hashtable_insert(self, new_node->key, new_node->value); git_hashtable_insert(self, new_node->key, new_node->value);
...@@ -248,7 +248,7 @@ int git_hashtable_remove(git_hashtable *self, const void *key) ...@@ -248,7 +248,7 @@ int git_hashtable_remove(git_hashtable *self, const void *key)
} }
} }
return GIT_ENOTFOUND; return git__throw(GIT_ENOTFOUND, "Failed to remove entry. Entry not found");
} }
int git_hashtable_merge(git_hashtable *self, git_hashtable *other) int git_hashtable_merge(git_hashtable *self, git_hashtable *other)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment