Over the last couple years, I’ve started putting my Exception messages inside static methods on custom exception classes. This is hardly a new trick, Doctrine’s been doing it for the better part of a decade. Still, many folks are surprised by it, so this article explains the how and why.
Want to add comments to your Statamic powered site? Try out Meerkat: a beautiful, full-featured comment system for Statamic. (sponsored link)
Formatting exception messages
Posted on | Freek Van der Herten