Log the exception to debug