Relative Content

Tag Archive for phpmysqlmariadb

Best practices for database error handling

This problem came up when I started to do unit testing for a website that I wrote. Whether I mock the database or spin up a Docker instance to use is a question for later, but what really got me curious is how to handle errors in PHP for trying to instantiate an object, but failed.