Re: [RFC 0/5] RFC: require error handling for dynamically created objects

2024-10-31 Thread Peter Xu
On Thu, Oct 31, 2024 at 03:53:45PM +, Daniel P. Berrangé wrote: > With code like > > Object *obj = object_new(TYPE_BLAH) > > the caller can be pretty confident that they will successfully create > an object instance of TYPE_BLAH. They know exactly what type has been > requested, so it pas

[RFC 0/5] RFC: require error handling for dynamically created objects

2024-10-31 Thread Daniel P . Berrangé
With code like Object *obj = object_new(TYPE_BLAH) the caller can be pretty confident that they will successfully create an object instance of TYPE_BLAH. They know exactly what type has been requested, so it passing an abstract type for example, it is a clear programmer error that they'll get