PHPnews.io



Smarter throwing [blog]

Written by Remy Sharp / Original link on Sep. 24, 2020

With async/await becoming standard procedure for a lot of my code, I find myself wrapping blocks of code in try/catch to ensure I'm handling errors properly.As a result of this, I also try to make my errors a little more useful at the same that I want to show you in this mini post.The exampleI have…