dm snapshot: refactor __find_pending_exception