Session exceptions
| From: | Kaspar Pedersen | Date: | Wed, 02 Oct 2013 12:40:27 +0000 |
| Subject: | Session exceptions | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-11145@lists.php.net to get a copy of this message | ||
Hello
I have run into some problems in my session handler which I am having a hard time figuring out.
I do the following in my read function:
PS_READ_FUNC(riak)
….
RIAK_CALL_METHOD2(RiakBucket, get, zoutput, data->zbucket, zkey, data->zgetprops);
if (EG(exception)) {
// HANDLE
This works fine unless session autostart is turned on, then the if is never reached if an exception
is thrown, instead you get an Unhandled exception immediately I think tracked it down to this:
in the zend_throw_exception_internal function in zend_exception.c
if (!EG(current_execute_data)) {
if(EG(exception)) {
zend_exception_error(EG(exception), E_ERROR TSRMLS_CC);
}
it seems current_execute_data is not setup when autostart is on, opposed to when you use
session_start() function in your php code.
I have been digging a lot without any luck, is there any of you that have a explanation of why
current_execute_data is not setup yet?
Br.
/Kaspar