Update the setErrHandler call to return the previous error handler.