Menu
I’m trying to develop a skeleton of common classes to use in my PHP apps, which will involve multiple layers of classes and includes. I’m currently trying to determine the best method for error handling. My first thought was to universally handle errors by throwing exceptions, and putting the very top layer of the code (i.e., the index page) inside a try/catch block.
Is this resource efficient, though? Does running code in a try/catch increase overhead, and is it a bad idea to essentially have all site code in each request running in a try/catch block?