Skip to content
Snippets Groups Projects
Commit 02c274f3 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Explicit error when failing to generate file in ExportNode.

parent 07c12bbb
No related branches found
No related tags found
3 merge requests!279v0.4.0,!253v0.4.0,!235Add support for GridSample + Minor changes
...@@ -299,11 +299,15 @@ class ExportNodeCpp(ExportNode): ...@@ -299,11 +299,15 @@ class ExportNodeCpp(ExportNode):
if self.config_template != "": if self.config_template != "":
path_to_definition = f"{self.config_path}/{self.attributes['name']}.{self.config_extension}" path_to_definition = f"{self.config_path}/{self.attributes['name']}.{self.config_extension}"
code_generation.generate_file(
str(export_folder / path_to_definition), try:
self.config_template, code_generation.generate_file(
**self.attributes 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) kernel_include_list.append(path_to_definition)
return self.include_list + kernel_include_list return self.include_list + kernel_include_list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment