catch a shutdown exception.