COVESA / COVESA/ifex

Add motivation for `error` element in `method`

Open
#76 2 comments 0 reactions 0 assignees View on GitHub
IFEX-spec-and-model
Dominant language
Python
Stars
24
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Add paragraphs to the `error` sub section under `method` that explains why `error` has been specified next to the similar `out` argument.

- **Static code analysis**
A service spec can be checked for error value coverage, flagging methods that lack minimal error handling.

- **Consistent error management**
The generated code handles all errors in the same distinct way, removing the risk of having a service developer mixing return values and error reporting in an arbitrary way.

- **Exception support**
An explicit error element maps directly to raised exceptions in languages that support them.

- **Optional**
An error section does not need to be specified for a method. Conversely, language-specific code generator may chose to emit error reporting code as another return value in cases where the language offers limited error management (such as C).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the IFEX documentation at the `method` section and locate its `error` subsection. Add the requested motivation paragraphs covering static analysis, consistent error management, exception support, and optional language-specific handling; done means all four points are clearly documented alongside the existing `out` explanation.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.