File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,18 @@ class ChipFlowError(Exception):
2323
2424
2525def _get_cls_by_reference (reference , context ):
26+ logger .debug (f"_get_cls_by_reference({ reference } , { context } " )
2627 module_ref , _ , class_ref = reference .partition (":" )
2728 try :
2829 module_obj = importlib .import_module (module_ref )
2930 except ModuleNotFoundError as e :
30- raise ChipFlowError (f"Module `{ module_ref } ` referenced by { context } is not found" ) from e
31+ logger .debug (f"import_module({ module_ref } ) caused { e } " )
32+ raise ChipFlowError (f"Module `{ module_ref } ` was not found (referenced by { context } in [chipflow.top])" )
3133 try :
3234 return getattr (module_obj , class_ref )
3335 except AttributeError as e :
34- raise ChipFlowError (f"Module ` { module_ref } ` referenced by { context } does not define "
35- f"` { class_ref } `" ) from e
36+ logger . debug (f"getattr( { module_obj } , { class_ref } ) caused { e } " )
37+ raise ChipFlowError ( f"Class ` { class_ref } ` not found in module ` { module_ref } ` (referenced by { context } in [chipflow.top])" )
3638
3739
3840def _ensure_chipflow_root ():
You can’t perform that action at this time.
0 commit comments