Let's say you had a class that you wanted to use, but there was some sort of error in creating the object. This might be that the wrong parameters were passed, or the third party service (eg. a database) wasn't available at the time of creation. If this happens you'll obviously want to handle the error correctly, but the question is would you throw an exception in the constructor or handle the err...
New! Should A Constructor Throw An Exception?
Feb 19, 2024
Переглянути всі публікації
I was reminded recently about how a GitLab engineer managed to delete the prod database , and that got me thinking about one of my biggest (production) mistakes. It's been at least 5 years since this happened so I think it's safe to tell the story of when I dropped a production database of one of my clients. At the time I was working on a (pretty large) Drupal website for an &nbs...
That Time I Dropped The Production Database
Feb 04, 2024