check for exception