com pecl/file_formats/haru: Implement FR #693 18 (Expose status value as HaruException:: $code) Fix typos in error messages: haru.c

From: Date: Fri, 27 Mar 2015 23:47:24 +0000
Subject: com pecl/file_formats/haru: Implement FR #693 18 (Expose status value as HaruException:: $code) Fix typos in error messages: haru.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-21989@lists.php.net to get a copy of this message
Commit: cadf22a0071c56b832c8ae2e495fbbf1cc8ada38 Author: Boris Madzar <p@wspnr.com> Fri, 27 Mar 2015 19:47:24 -0400 Parents: 79d6f4b039550264387bade5139187f411fceb3f Branches: master Link: http://git.php.net/?p=pecl/file_formats/haru.git;a=commitdiff;h=cadf22a0071c56b832c8ae2e495fbbf1cc8ada38 Log: Implement FR #69318 (Expose status value as HaruException::$code) Fix typos in error messages Bugs: https://bugs.php.net/69318 Changed paths: M haru.c Diff: diff --git a/haru.c b/haru.c index 1beae75..531b12f 100644 --- a/haru.c +++ b/haru.c @@ -526,7 +526,7 @@ static int php_haru_status_to_errmsg(HPDF_STATUS status, char **msg) /* {{{ */ *msg = estrdup("Tried to register a font that has been registered"); break; case HPDF_EXCEED_JWW_CODE_NUM_LIMIT: - *msg = estrdup("Cannot register a character to the japanese word wrap characters list"); + *msg = estrdup("Cannot register a character to the Japanese word wrap characters list"); break; case HPDF_ENCRYPT_INVALID_PASSWORD: *msg = estrdup("Tried to set the owner password to NULL or the owner password and user password are the same"); @@ -692,7 +692,7 @@ static int php_haru_status_to_errmsg(HPDF_STATUS status, char **msg) /* {{{ */ *msg = estrdup("Unsupported or invalid ttf format (cannot find a necessary table)"); break; case HPDF_UNSUPPORTED_FUNC: - *msg = estrdup("The library is not configured to use PNGLIB or internal error occured"); + *msg = estrdup("The library is not configured to use PNGLIB or internal error occurred"); break; case HPDF_UNSUPPORTED_JPEG_FORMAT: *msg = estrdup("Unsupported or invalid JPEG format"); @@ -725,7 +725,7 @@ static int php_haru_status_to_errmsg(HPDF_STATUS status, char **msg) /* {{{ */ *msg = estrdup("Insufficient space for text"); break; default: - *msg = estrdup("Unknown error occured, please report"); + *msg = estrdup("Unknown error occurred, please report"); break; } return 1; @@ -738,7 +738,7 @@ static int php_haru_status_to_exception(HPDF_STATUS status TSRMLS_DC) /* {{{ */ if (status != HPDF_OK) { char *msg; php_haru_status_to_errmsg(status, &msg); - zend_throw_exception_ex(ce_haruexception, 0 TSRMLS_CC, msg); + zend_throw_exception_ex(ce_haruexception, status TSRMLS_CC, msg); efree(msg); return 1; }

« previous php.pecl.cvs (#21989) next »