diff --git a/aidge_core/export_utils/node_export.py b/aidge_core/export_utils/node_export.py index d22cc65d1eb247d09a48318d83274acfc3757d3d..479eaf01ff8c8e85a3bf83adac88f5ee7fe86857 100644 --- a/aidge_core/export_utils/node_export.py +++ b/aidge_core/export_utils/node_export.py @@ -299,11 +299,15 @@ class ExportNodeCpp(ExportNode): if self.config_template != "": path_to_definition = f"{self.config_path}/{self.attributes['name']}.{self.config_extension}" - code_generation.generate_file( - str(export_folder / path_to_definition), - self.config_template, - **self.attributes - ) + + try: + code_generation.generate_file( + str(export_folder / path_to_definition), + self.config_template, + **self.attributes + ) + except Exception as e: + raise RuntimeError(f"Error when creating config file for {self.node.name()}[{self.node.type()}].") from e kernel_include_list.append(path_to_definition) return self.include_list + kernel_include_list