File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2323from dbt .contracts .graph .manifest import Manifest
2424from dbt .contracts .results import RunResult
2525from dbt .events .functions import setup_event_logger
26- from dbt .exceptions import InternalException
2726from dbt .graph import Graph
2827from dbt .main import adapter_management , track_run
2928from dbt .task .base import BaseTask , move_to_nearest_project_dir
@@ -186,6 +185,11 @@ def patch_manifest_task(self, task: ManifestTask):
186185 Raises:
187186 TypeError: If the dbt task is not a subclass of ManifestTask.
188187 """
188+ try :
189+ from dbt .exceptions import InternalException as DbtException
190+ except ImportError :
191+ from dbt .exceptions import DbtRuntimeError as DbtException
192+
189193 if isinstance (task , ManifestTask ) is False :
190194 raise TypeError (
191195 f"Patching requires an instance of ManifestTask, not { type (task )} "
@@ -220,7 +224,7 @@ def _runtime_initialize():
220224 elif uid in task .manifest .sources :
221225 task ._flattened_nodes .append (task .manifest .sources [uid ])
222226 else :
223- raise InternalException (
227+ raise DbtException (
224228 f"Node selection returned { uid } , expected a node or a "
225229 f"source"
226230 )
You can’t perform that action at this time.
0 commit comments