diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-07-04 20:50:56 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-07-04 22:17:07 -0700 |
commit | 3ef4f9fd1e6ae233adb0bbfd90573623ee1059e6 (patch) | |
tree | a4ce04703e37a683f33d8675c6f10e21d4070e6a /src/libs | |
parent | 68f6dee32dea0fb1bfe40d901169cf68aa6528d0 (diff) |
modules/*: return invalid setting on -EINVAL in setup
In the interests of improving error handling of interactive
setups, return the setting that was invalid when setup returns
-EINVAL.
For now this is only supported for non-finalized/non-baking setup
calls, i.e. (!res_setup).
In the future I want this also supported for finalizing when
res_setup is set. A lot of the -EINVAL returns are actually
during that stage (or need to be added) due to that being when
the more sensitive parsing occurs going from strings to native
numeric types and such.
The main reason it's not already being done in this commit is
it'll churn quite a bit to get there, since the setup funcs don't
generally have the setting pointers onhand at that phase. It'll
require changing the string-value-centric local variables to
instead all be the til_setting_t* holding those values.
And if setup funcs aren't going to be so value-centric, the
settings API will likely change to not even return the values
directly anymore and only return the full-blown til_settings_t as
the main return pointer, perhaps rid of their res_setting use
even.
Anyway, while here I did some random little cleanups too.
Diffstat (limited to 'src/libs')
0 files changed, 0 insertions, 0 deletions