Skip to content

Commit 6bb5af4

Browse files
committed
Merge pull request #13 from Asgrim/change-getParent-error-to-exception
Convert getParent error into exception for easier catching
2 parents 5389594 + caa241e commit 6bb5af4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ PHP_METHOD(git_commit, getParent)
359359

360360
ret = git_commit_parent(&commit, this->object,offset);
361361
if(ret != GIT_SUCCESS){
362-
php_error_docref(NULL TSRMLS_CC, E_ERROR, "specified offset not found.");
362+
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC, "specified offset not found");
363363
RETURN_FALSE;
364364
}
365365

0 commit comments

Comments
 (0)