The exception handling can be much easier in this case. You only need the catch( Exception $e ) and the line for logging. All other catch() blocks are not necessary then.