Skip to content

Commit

Permalink
enable raising error objects directly
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Heinrich <[email protected]>
  • Loading branch information
andistorm committed Jan 9, 2024
1 parent a054460 commit d8b32eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public:
// no errors defined for this interface
{% else %}
// raise functions for errors
// general raise function
Everest::error::ErrorHandle raise_error_object(const Everest::error::Error& error) {
return _ev->raise_error_object(_name, error);
}
// type specific raise functions
{% for error in errors %}
Everest::error::ErrorHandle raise_{{ error.namespace }}_{{ error.name }}(const std::string& message, const Everest::error::Severity& severity=Everest::error::Severity::Low) {
return _ev->raise_error(
Expand Down

0 comments on commit d8b32eb

Please sign in to comment.