You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
PHP: PHP 7.2.14 (cli) (built: Jan 9 2019 22:23:26) ( ZTS MSVC15 (Visual C++ 2017) x64 )
pthreads: 3.2.0
OS: Windows 7 Pro x64
Summary
I would like to be able to get the termination info of a thread. I know Threaded::getTerminationInfo() was removed in v3 because you can wrap the Threaded::run method into a try-catch block, but my issue is deeper.
I'm using a Thread as worker to handle tasks asynchronously. However when a fatal error occurs, this can not be caught, and even if it were recoverable fatal error I can't. Since the thread continues to run after invoking the run method and leaves any try-catch blocks, the started thread may crash at any time, without affecting the main thread. The fatal error message will be written to the console.
An example I'm currently debugging:
PHP Fatal error: Method Exception::__toString() must not throw an exception, caught ErrorException: Expected array for frame 0 in ... on line 0
PHP Stack trace:
PHP 1. ...
I'd like to be able to get the termination information (in essence the fatal error informatio in the case above), including the level, to be able to log and handle the error correctly. This would also allow me to integrate it into Sentry.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
Summary
I would like to be able to get the termination info of a thread. I know
Threaded::getTerminationInfo()
was removed in v3 because you can wrap theThreaded::run
method into a try-catch block, but my issue is deeper.I'm using a
Thread
as worker to handle tasks asynchronously. However when a fatal error occurs, this can not be caught, and even if it were recoverable fatal error I can't. Since the thread continues to run after invoking therun
method and leaves anytry-catch
blocks, the started thread may crash at any time, without affecting the main thread. The fatal error message will be written to the console.An example I'm currently debugging:
I'd like to be able to get the termination information (in essence the fatal error informatio in the case above), including the level, to be able to log and handle the error correctly. This would also allow me to integrate it into Sentry.
The text was updated successfully, but these errors were encountered: