Skip to content

Conversation

@adrien914
Copy link

@adrien914 adrien914 commented May 19, 2025

JsonFormatter threw an exception when $object->toString() failed. I changed it to return the class of the object instead of the string representation if it was the case

Closes #1969

@Seldaek
Copy link
Owner

Seldaek commented Oct 24, 2025

Thanks, makes sense to suppress the exception.. I just wonder if we should include the message in the output like obj::class (exceptionMessage) instead of just obj::class? That could provide more transparency on what failed.. but could also result in messy output and possibly leaked info so I'm a bit conflicted.

@Seldaek Seldaek added this to the 3.x milestone Oct 24, 2025
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.

JsonFormatter crashes when stringable object has an error

3 participants