mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add zend_throw_exception_ex() which allows to format exception messages.
# # Since we don't have any portable way of printing into a dynamic buffer i # used a stack buffer of 1K (just like the error printing) and used a dynamic # buffer in case the necessary function is available. #
This commit is contained in:
parent
12376a2270
commit
fa70708d15
4 changed files with 96 additions and 0 deletions
|
@ -30,6 +30,7 @@ ZEND_API void zend_register_default_classes(TSRMLS_D);
|
|||
/* exception_ce NULL or zend_exception_get_default() or a derived class
|
||||
* message NULL or the message of the exception */
|
||||
ZEND_API void zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
|
||||
ZEND_API void zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...);
|
||||
|
||||
/* show an exception using zend_error(E_ERROR,...) */
|
||||
ZEND_API void zend_exception_error(zval *exception TSRMLS_DC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue