Re: Extending Error Codes
Zięcik, Piotr <piotr.ziecik@...>
toggle quoted messageShow quoted text
From: Cufi, Carles
Sent: Monday, May 07, 2018 11:57 AM
To: Zięcik, Piotr <Piotr.Ziecik@nordicsemi.no>; Puzdrowski, Andrzej <Andrzej.Puzdrowski@nordicsemi.no>; email@example.com
Subject: RE: [Zephyr-devel] Extending Error Codes
Hi.Hi.I agree. I think a single set of generic error codes that are flexible enough to convey the message are a better approach.
I have looked into the error list available in ./lib/libc/minimal/include/errno.h and it looks that there are plenty of errors defined, however most of these defines are rather high-level.
If this is not enough, I could recommend following the Linux approach, which in my opinion is pretty simple and gives some flexibility:
We can divide the error lists in 2 parts, listed in 2 different files. The first file, will cover generic, high level errors (and could be provided by libc).
The second file will be zephyr-specific. There should be also single errno.h header, which will include both libc and zephyr headers.
What do you think?