Closed RadoslavGeorgiev closed 8 years ago
When an error is thrown within a __toString() conversion, PHP only reports that exceptions should not be thrown within __toString().
__toString()
This makes eliminating even the slightest bug tedious.
Try to avoid those conversions as much as possible, for example within the Builder class and within blocks.
Builder
Improved in 161a612ab71699b9e1a8df8bd2a6b7e946b1a059
The builder and the block will return a string with the exception instead of just fail.
When an error is thrown within a
__toString()
conversion, PHP only reports that exceptions should not be thrown within__toString()
.This makes eliminating even the slightest bug tedious.
Try to avoid those conversions as much as possible, for example within the
Builder
class and within blocks.