Cannot find cause of #3135 - added try catch to prevent fatal errors and inform admin of issue if debug is on

@coenjacobs I don't know if you want to keep this as a preventitive
measure? Should stop bad code breaking things anyway.