I'm currently organising the third edition Full Stack Europe. It's a conference in Antwerp, Belgium in October for developers who want to learn across the stack. We have a great line up with lots of familiar faces! Register your ticket now!

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

You can follow me on these platforms:

On all these platforms, regularly share 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 "How to write exceptionally good exceptions in PHP"?

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

Webmentions

José Cage liked on 6th March 2020
Arno Stalpaert liked on 6th March 2020
salierdev liked on 6th March 2020
Geoffrey van Wyk liked on 5th March 2020
Nuno Souto liked on 5th March 2020
Tyler Rehm liked on 5th March 2020
Dinh Quoc Han 🐳 liked on 5th March 2020
Adam Lukačovič liked on 5th March 2020
Vladyslav liked on 5th March 2020
Gósen 🔦 liked on 5th March 2020
Gaurav Makhecha replied on 27th February 2020
5/ One more gem from the @getMailCoach's codebase by @freekmurze - How to write exceptionally good exceptions📝 in PHP 📹 twitter.com/freekmurze/sta…
Felix Huber liked on 26th February 2020
Dennis Micky Jensen liked on 26th February 2020
Mohamed Gamal liked on 26th February 2020
Gaurav Makhecha replied on 26th February 2020
5/ One more gem from the @getMailCoach's codebase by @freekmurze - How to write exceptionally good exceptions📝 in PHP 📹 twitter.com/freekmurze/sta…
Adam Cameron replied on 26th February 2020
(1/2) I like the idea of an exception factory, which is what you've created there, but I don't think the factory should also be an exception itself? Means it's doing two unrelated things: it's an exception, and it's a factory. [...]
Amitav Roy liked on 26th February 2020
Anatoli Nicolae liked on 25th February 2020
Filipe Knoedt liked on 25th February 2020
Felipe Dalcin liked on 25th February 2020
Leonardo Prabangkoro liked on 25th February 2020
Alejandro Vásquez N. liked on 25th February 2020
Rakesh Kumar liked on 25th February 2020
togo liked on 25th February 2020
Gregori Piñeres liked on 25th February 2020
Musa  liked on 25th February 2020
mr flash liked on 25th February 2020
Leonel Elimpe liked on 25th February 2020
Christian liked on 25th February 2020
Alexander Jank replied on 25th February 2020
How would you do it? - Define one Exception class for each discrete error?
Oliver Stark liked on 25th February 2020
Fabricio Zeferino liked on 25th February 2020
Rohit P. Shirke liked on 25th February 2020
Adam Crampton liked on 25th February 2020
Webist replied on 25th February 2020
Congrats, you've just killed de real purpose of exceptions. Technical errors were already poorly understood an now they became political statements therefore nobody knows which character or else is causing the problem.
Magento Extensions & Services liked on 25th February 2020
Nathan Smith liked on 25th February 2020
GrandBlond 🇨🇿 liked on 25th February 2020
Scorp974 liked on 25th February 2020
Michael Smith liked on 25th February 2020
Mindaugas liked on 25th February 2020
Vikash Pathak retweeted on 25th February 2020
Phillipe S. Ciranda retweeted on 25th February 2020
Vikash Pathak liked on 25th February 2020
Ricardo Fuhrmann liked on 25th February 2020
Phillipe S. Ciranda liked on 25th February 2020
bernard kssy 💻 Busy retweeted on 25th February 2020
Mr.Miraj khan liked on 25th February 2020
Neil Carlo Faisan Sucuangco liked on 25th February 2020
Devin Gray retweeted on 25th February 2020
Giorgi Gelashvili liked on 25th February 2020
Rhincodon liked on 25th February 2020
Jose Ortiz retweeted on 25th February 2020
Arputharaj retweeted on 25th February 2020
Arputharaj liked on 25th February 2020
Cristian Cardiño liked on 25th February 2020
Ihor Vorotnov • 25% liked on 25th February 2020
tmux new -s devdrops liked on 25th February 2020
Frano Šašvari retweeted on 24th February 2020
PHP Synopsis retweeted on 24th February 2020
Tom Irons liked on 24th February 2020
Pierce McGeough liked on 24th February 2020
Guus liked on 24th February 2020
Frano Šašvari liked on 24th February 2020
Matthew Campbell liked on 24th February 2020
Coderatio liked on 24th February 2020
Alexander Jank liked on 24th February 2020
assoftTR liked on 24th February 2020
Pablo replied on 24th February 2020
How do you then handle those exceptions?
Gareth Redfern retweeted on 24th February 2020
Salman Zafar liked on 24th February 2020
Gareth Redfern liked on 24th February 2020
James Smith liked on 24th February 2020
Zubair Mohsin liked on 24th February 2020
Maarten Buis liked on 24th February 2020
Arne Sierens liked on 24th February 2020
Mike liked on 24th February 2020
Petr Myazin liked on 24th February 2020
cg replied on 24th February 2020
This site feedback has to worth an extra 200 entries, right? 😉
olabamipe Taiwo retweeted on 24th February 2020
olabamipe Taiwo liked on 24th February 2020
Gerben liked on 24th February 2020
Johan Alvarez liked on 24th February 2020
iBet7o liked on 24th February 2020
Duddin retweeted on 24th February 2020
Kalle Palokankare liked on 24th February 2020
Joe Grainger liked on 24th February 2020
Benjamin retweeted on 24th February 2020
oluwajubelo loves VueJS 🚨 retweeted on 24th February 2020
Rebaz Saleh liked on 24th February 2020
Joiner Leal liked on 24th February 2020
silvester landu hunggu wali liked on 24th February 2020
Michael Aguiar liked on 24th February 2020
oluwajubelo loves VueJS 🚨 liked on 24th February 2020
Pedro Giacometto liked on 24th February 2020
Rebaz Saleh replied on 24th February 2020
Thank you for sharing all this information. I read alot on your website. But this is the second time that I kinda have difficulty watching the videos. Would that be possible to have a written version? Thank you again
Jigal Sanders retweeted on 24th February 2020
Owen Voke (pxgamer) retweeted on 24th February 2020
Jigal Sanders liked on 24th February 2020
Owen Voke (pxgamer) liked on 24th February 2020
StoicDojo liked on 24th February 2020
Hadi Swais liked on 24th February 2020
Kennith liked on 24th February 2020
Bas de Groot liked on 24th February 2020
Ruslan liked on 24th February 2020
Gósen 🔦 liked on 24th February 2020
traviselkins liked on 24th February 2020
Sam Snelling liked on 24th February 2020
Omar Andrés Barbosa Ortiz liked on 24th February 2020
Gasol Wu liked on 24th February 2020
Paul Reynolds liked on 24th February 2020
Abubakar Sadiq Umar liked on 24th February 2020
Akmal Halabi liked on 24th February 2020
traviselkins replied on 24th February 2020
Nice video. I picked up on this practice from seeing you use it in some of your open source packages. It's great, though, that you've talked about it directly via video and showing the differences. Nice...! Thx.
Adel F replied on 24th February 2020
Good one! I only can suggest to extend these exceptions from \DomainException class, not just \Exception.
Ahmed Ashraf 👨‍💻 retweeted on 24th February 2020
Khai Rahman retweeted on 24th February 2020
ダビッド トレス retweeted on 24th February 2020
Bruno CHIREZ liked on 24th February 2020
Alexis Rojas liked on 24th February 2020
PakistanZindabad liked on 24th February 2020
Tom de Wit liked on 24th February 2020
Richard Ottinger liked on 24th February 2020
Florian Engelhardt liked on 24th February 2020
Mike liked on 24th February 2020
Ahmed Ashraf 👨‍💻 liked on 24th February 2020
Miguel Piedrafita 🚀 liked on 24th February 2020
Kawan Koding liked on 24th February 2020
eminiarts liked on 24th February 2020
Didik Tri Susanto liked on 24th February 2020
Khai Rahman liked on 24th February 2020
ダビッド トレス liked on 24th February 2020