MCPcopy Create free account
hub / github.com/treeverse/dvc / _wrap_exceptions

Function _wrap_exceptions

dvc/api/data.py:12–25  ·  view source on GitHub ↗
(repo, url)

Source from the content-addressed store, hash-verified

10
11@contextmanager
12def _wrap_exceptions(repo, url):
13 from dvc.config import NoRemoteError
14 from dvc.exceptions import NoOutputInExternalRepoError, NoRemoteInExternalRepoError
15
16 try:
17 yield
18 except NoRemoteError as exc:
19 raise NoRemoteInExternalRepoError(url) from exc
20 except OutputNotFoundError as exc:
21 if exc.repo is repo:
22 raise NoOutputInExternalRepoError(exc.output, repo.root_dir, url) from exc
23 raise
24 except FileMissingError as exc:
25 raise PathMissingError(exc.path, url) from exc
26
27
28def get_url(

Callers 1

_openFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…