Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Pfender <jpfender@elegosoft.com>2011-05-17 19:22:33 +0400
committerVicent Marti <tanoku@gmail.com>2011-05-23 21:44:10 +0400
commit4152a44bd87fc56fe75287e8e6551d903f7236dd (patch)
tree4da6fd635aae046b7b61cabcef43801a6b2501c9 /src/delta-apply.c
parent21dcb75abd9b03b15853d820f884d32d7d534f41 (diff)
delta-apply.c: Move to new error handling mechanism
Diffstat (limited to 'src/delta-apply.c')
-rw-r--r--src/delta-apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/delta-apply.c b/src/delta-apply.c
index 5bcdc2003..a6b711436 100644
--- a/src/delta-apply.c
+++ b/src/delta-apply.c
@@ -46,10 +46,10 @@ int git__delta_apply(
* base object, resulting in data corruption or segfault.
*/
if ((hdr_sz(&base_sz, &delta, delta_end) < 0) || (base_sz != base_len))
- return GIT_ERROR;
+ return git__throw(GIT_ERROR, "Failed to apply delta. Base size does not match given data");
if (hdr_sz(&res_sz, &delta, delta_end) < 0)
- return GIT_ERROR;
+ return git__throw(GIT_ERROR, "Failed to apply delta. Base size does not match given data");
if ((res_dp = git__malloc(res_sz + 1)) == NULL)
return GIT_ENOMEM;
@@ -105,5 +105,5 @@ int git__delta_apply(
fail:
free(out->data);
out->data = NULL;
- return GIT_ERROR;
+ return git__throw(GIT_ERROR, "Failed to apply delta");
}