Creating an exception handler and trying to wind down doctrine flushes