return error on property changes
Patrick Williams
patrick at stwcx.xyz
Tue Apr 25 22:45:22 AEST 2023
On Sun, Apr 23, 2023 at 08:29:03AM +0000, Francine Sauvage wrote:
> Hi,
> I cannot implement the following use case:
>
> From bmcweb code, I set RequestedPowerTransition.
> From requestedPowerTransition (phosphor-state-manager) code , I have a bad condition and I reject the transition.
>
> ==> How can I throw something (error code, exception ?) back to bmcweb in order to know what happened exactly ?
>
> I was not able to add a "exceptions:" part in yaml around a property to create and throw a specific exception while getting / setting a property, like I did with methods.
>
> I need to declare (and return) an exception while a property is changing, especially when the transition is not accepted.
>
> I have an old version of openbmc, it may be solved in the new version, but please tell me how to help me eventually patching the needed parts,
>
I think you used the wrong YAML keyword.
```
$ git grep "exceptions:" | wc -l
0
$ git grep "errors:" | wc -l
161
```
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20230425/920a0563/attachment-0001.sig>
More information about the openbmc
mailing list