Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #810 rebased against 1.2.1 #828

Merged
merged 5 commits into from Jul 11, 2013
Merged

Fix for #810 rebased against 1.2.1 #828

merged 5 commits into from Jul 11, 2013

Conversation

ghost
Copy link

@ghost ghost commented Jul 11, 2013

See #810

phalcon pushed a commit that referenced this pull request Jul 11, 2013
Fix for #810 rebased against 1.2.1
@phalcon phalcon merged commit 9813b6e into phalcon:1.2.1 Jul 11, 2013
@ghost ghost deleted the issue-810 branch July 11, 2013 22:23
@phalcon
Copy link
Collaborator

phalcon commented Jul 11, 2013

thank you

@sjinks do you know a way to catch a PHP exception inside the extension?

@ghost
Copy link
Author

ghost commented Jul 11, 2013

if (EG(exception)) {
    /* Userland thrown an exception */
    assert(Z_TYPE_P(EG(exception)) == IS_OBJECT);
    assert(instanceof_function(Z_OBJCE_P(EG(exception)), zend_exception_get_default(TSRMLS_C) TSRMLS_CC));

    /* If you have handled the exception (ie, emulated `catch()` block), then */
    zend_clear_exception(TSRMLS_C);
}

@phalcon
Copy link
Collaborator

phalcon commented Jul 11, 2013

Thank you, going to add a better error handler in Mvc\Dispatcher and Mvc\Micro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants