Hi Zheng

2016-11-25 6:40 GMT+01:00 Zheng Shao <a...@axot.org>:
> I'm confused by how to handle an error inside php_apache_sapi_read_post, 
> shoud I throw a zend_throw_exception or use a global flag for error handling?

php_apache_sapi_read_post() is invoked very early on
(php_module_startup > sapi_activate > sapi_read_post_data), and
therefore we are too early at initialization that you cannot really
throw an exception to the user. What you can do however is to call
php_apache_sapi_log_message() and try to log the error in the Apache
error log instead, which seems more reasonable to me.

-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to