I am using the cache library with the Redis adapter in a Symfony 4 application and I get the following exception intermittently:
Uncaught PHP Exception Cache\Adapter\Common\Exception\CachePoolException: "Exception thrown when executing "Cache\Adapter\Common{closure}". " at AbstractCachePool.php line 337 {"exception":"[object] (Cache\Adapter\Common\Exception\CachePoolException(code: 0): Exception thrown when executing "Cache\Adapter\Common\{closure}".
I looked at the AbstractCachePool at that line and I see the exception handling is wrapped in a method to centralize it but the location where the exception originates is hidden by the logger through closure rather than displaying the method it threw it. Is it possible to have that exception show the exact method it originates from?
The text was updated successfully, but these errors were encountered:
This is the reason I posted this issue because I am unable to find out where the error originates from. It might be based on a Redis timeout, some network issue, a bad cache key or anything else but within the handleException method of the AbstractCachePool, there is a parameter $function which apparently passes the __FUNCTION_ in the caller but in PHP 7.2 it logs as {closure} rather than the function name. Will try to make a reproducer.
Hi,
I am using the cache library with the Redis adapter in a Symfony 4 application and I get the following exception intermittently:
I looked at the AbstractCachePool at that line and I see the exception handling is wrapped in a method to centralize it but the location where the exception originates is hidden by the logger through
closure
rather than displaying the method it threw it. Is it possible to have that exception show the exact method it originates from?The text was updated successfully, but these errors were encountered: