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
This leads to the Fatal Error which is quite tricky to debug.
Whether there could be any better strategy for this piece of code? Maybe to wrap trigger_error in a try-catch block and do return '' if an exception was thrown? Or at least to add the comment like if you still do get "FatalError ::__toString must not throw an exception" it is cause your error handler throw an exception - this could save some time in debugging.
The text was updated successfully, but these errors were encountered:
Is the fatal error saying that __toString should not throw exceptions? Can you please provide more information (code, error messages, etc), what you exactly see? Thanks!
There is the work around in
StreamDecoratorTrait::__toString
method for inability of__toString
to throw exceptions.The problem that there could be user-defined handlers that throws Exceptions on their own like it was in 2.7 version of Symfony
https://github.com/symfony/symfony/blob/ff630e19bbdea66d972a969445ecc2396c754aac/src/Symfony/Component/Debug/ErrorHandler.php#L399-L415
This leads to the
Fatal Error
which is quite tricky to debug.Whether there could be any better strategy for this piece of code? Maybe to wrap
trigger_error
in atry-catch
block and doreturn ''
if an exception was thrown? Or at least to add the comment likeif you still do get "FatalError ::__toString must not throw an exception" it is cause your error handler throw an exception
- this could save some time in debugging.The text was updated successfully, but these errors were encountered: