I have some code that makes db calls and network requests and I have it wrapped in a try/catch. The problem is that I can never catch the exceptions, and they don't appear to be fatal exceptions:
try { // make db requests and network calls } catch (Exception $e) { // handle exception } Namely, I encounter exceptions such as these:
[Illuminate\Database\QueryException] [PDOException] [InvalidArgumentException] Is there a way to catch these exceptions? Do I need to be explicit for each possible type of exception object (meaning I must create many try/catches), or is there a recommended way of catching non fatal exceptions?