catch the exception thrown when read cookie value