🏝 If you like the content of this blog, I would really appreciate your vote in Tuple's Send an Open Source Developer on Vacation contest. Just search for "Freek Van der Herten" in the nominees list and cast your vote. 🙌

😀 This holiday won't only be a nice reward for me, but also for my girlfriend who always gives me a lot of time working on open source packages and blog posts.

The magic of dedicated exception classes

Original – by Freek Van der Herten – 1 minute read

You can make your code more readable by moving all your exception messages to dedicated classes. We using this technique in all our projects and packages.

Stay up to date with all things Laravel, PHP, and JavaScript.

Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

Comments

What are your thoughts on "The magic of dedicated exception classes"?

Want to join the conversation? Log in or create an account to post a comment.

Webmentions

Roman Pronskiy liked on 13th May 2021
이현석 Hyunseok Lee liked on 11th May 2021
Jasper Briers liked on 11th May 2021
Jack Watling liked on 11th May 2021
Samuel Girardin liked on 11th May 2021
Matt liked on 11th May 2021
Vargas Josue liked on 11th May 2021
Mak Man liked on 11th May 2021
Claudson Martins 🇧🇷 liked on 11th May 2021
Salman Zafar liked on 11th May 2021
Tuginho liked on 11th May 2021
Amine TIYAL liked on 10th May 2021
Yannick Yayo liked on 10th May 2021
Nikola Vujović liked on 10th May 2021
imtiaz shakil liked on 10th May 2021
Hanny Ramzy liked on 10th May 2021
Dāvis replied on 10th May 2021
Old article.
Federico Corsaro liked on 10th May 2021
S Nageswara Rao retweeted on 10th May 2021
KoBig liked on 10th May 2021
KoBig retweeted on 10th May 2021
Tahsin Abrar liked on 10th May 2021
Julien Allexandre liked on 10th May 2021
RR liked on 10th May 2021
Jakub Hanák liked on 10th May 2021
Wyatt liked on 10th May 2021
Willington Vega retweeted on 10th May 2021
Mozammil liked on 10th May 2021
Willington Vega liked on 10th May 2021
Rohit P. Shirke liked on 10th May 2021
Morten Bak liked on 10th May 2021
Mike Rockétt liked on 10th May 2021
Abood liked on 10th May 2021
adibnoh retweeted on 10th May 2021
Robin Dirksen liked on 10th May 2021
Mark Myers liked on 10th May 2021
Asif Mulla liked on 10th May 2021
Calefyb retweeted on 10th May 2021
فرودو liked on 10th May 2021
Andy Hinkle liked on 10th May 2021
Luiyi Diloné liked on 10th May 2021
Alex liked on 10th May 2021
José Cage liked on 10th May 2021