Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-24 Thread Daniel P . Berrangé
On Wed, Jun 24, 2020 at 10:22:14AM +0200, Markus Armbruster wrote: > Eric Auger writes: > > > object_property_add() does not allow object_property_try_add() > > to gracefully fail as &error_abort is passed as an error handle. > > > > However such failure can easily be triggered from the QMP shell

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-24 Thread Auger Eric
Hi Markus, On 6/24/20 10:22 AM, Markus Armbruster wrote: > Eric Auger writes: > >> object_property_add() does not allow object_property_try_add() >> to gracefully fail as &error_abort is passed as an error handle. >> >> However such failure can easily be triggered from the QMP shell when, >> for

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-24 Thread Markus Armbruster
Eric Auger writes: > object_property_add() does not allow object_property_try_add() > to gracefully fail as &error_abort is passed as an error handle. > > However such failure can easily be triggered from the QMP shell when, > for instance, one attempts to create an object with an id that already

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Auger Eric
Hi Paolo, On 6/23/20 6:22 PM, Paolo Bonzini wrote: > On 23/06/20 17:54, Eric Auger wrote: >> This patch introduces two new functions, object_property_add_err() and >> object_property_add_child_err() whose prototype features an error handle. >> object_property_add_child_err() now gets called from u

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Paolo Bonzini
On 23/06/20 17:54, Eric Auger wrote: > object_property_add() does not allow object_property_try_add() > to gracefully fail as &error_abort is passed as an error handle. > > However such failure can easily be triggered from the QMP shell when, > for instance, one attempts to create an object with a

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Paolo Bonzini
On 23/06/20 17:54, Eric Auger wrote: > This patch introduces two new functions, object_property_add_err() and > object_property_add_child_err() whose prototype features an error handle. > object_property_add_child_err() now gets called from user_creatable_add_type. > This solution was chosen instea

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Paolo Bonzini
On 23/06/20 17:54, Eric Auger wrote: > object_property_add() does not allow object_property_try_add() > to gracefully fail as &error_abort is passed as an error handle. > > However such failure can easily be triggered from the QMP shell when, > for instance, one attempts to create an object with a

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Daniel P . Berrangé
On Tue, Jun 23, 2020 at 05:54:52PM +0200, Eric Auger wrote: > object_property_add() does not allow object_property_try_add() > to gracefully fail as &error_abort is passed as an error handle. > > However such failure can easily be triggered from the QMP shell when, > for instance, one attempts to

[PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Eric Auger
object_property_add() does not allow object_property_try_add() to gracefully fail as &error_abort is passed as an error handle. However such failure can easily be triggered from the QMP shell when, for instance, one attempts to create an object with an id that already exists: For instance, call t