On Sun, Apr 27, 2025, at 22:40, Kamil Tekiela wrote: > >The exception message MUST NOT be the only property that allows to > differentiate different types of error that the user may be interested in. > > What does this mean exactly? Can you give an example? >
Many people don’t know about the $previous property, which allows you to chain exceptions, for example. I’ve worked in more than one codebase with custom exceptions that are missing that. It makes for throwing from a catch more nebulous as you lose how you got there in the first place. — Rob