added state validation in the setExceptionHandler method