mratsim/laser

[Design] Error model

mratsim opened this issue · 0 comments

Error model is still to be decided.

Currently asserts are used https://github.com/numforge/laser/blob/be3326bca5d9096e912530c6ed946bb89ee01b6f/laser/strided_iteration/map_foreach.nim#L106-L110

Literature:

Challenges:

  • should the interface exposed be left to higher-level lib? (i.e. leave only asserts as those are removed on release builds)
  • If not:
    • Distinguish between recoverable and unrecoverable errors (bugs).
    • For embedded devices recoverable errors "API" must be documented, whether error code or exceptions are chosen.
  • Macros like forEach cannot use error codes, high level wrapper should take care of that