Skip to content

Commit

Permalink
Adapt Interface template to support feature 'request to clear all err…
Browse files Browse the repository at this point in the history
…ors of type X'

Signed-off-by: Andreas Heinrich <[email protected]>
  • Loading branch information
andistorm committed Oct 19, 2023
1 parent 727c70e commit 73f7628
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion ev-dev-tools/src/ev_cli/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ def convert_refs(file_content: str, converting_method) -> str:
line = f"{ parts[0] }:{ parts[1] }"
result += f'{ line }\n'
result = result.removesuffix('\n')
# print red
if(conversions > 0):
print(f'\033[91mcustom type $refs starting with \'/\' are deprecated: {conversions} refs converted in file\033[0m')
return result
Expand Down
10 changes: 8 additions & 2 deletions ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,17 @@ public:
);
}
{% endfor %}
// request clear functions for errors
{% for error in errors %}
void request_clear_all_{{ error.namespace }}_{{ error.name }}() {
_ev->request_clear_all_errors_of_type_of_module(_name, "{{ error.namespace }}/{{ error.name }}");
}
{% endfor %}
void request_clear_error(const Everest::error::ErrorHandle& handle) {
_ev->request_clear_error(_name, handle);
_ev->request_clear_error_uuid(_name, handle);
}
void request_clear_all_errors() {
_ev->request_clear_all_errors(_name);
_ev->request_clear_all_errors_of_module(_name);
}
{% endif %}

Expand Down

0 comments on commit 73f7628

Please sign in to comment.