Catch a potential exception