Re: [dev] VERIFY_SUCCESS and other macros

2018-03-06 Thread Steve Saunders (CableLabs)
I personally like macros that that check for errors conditions and that goto exit on error, where resources can be cleaned up. I think one thing missing from the existing macros was the ability to log issues, so I recently created VERIFY_OR_LOG_AND_EXIT which I have been happily using, for exam

Re: [dev] VERIFY_SUCCESS and other macros

2018-03-06 Thread Mats Wichmann
On 03/06/2018 12:38 PM, Nash, George wrote: > I am not a fan of the VERIFY_SUCCESS macro. It is not prefixed with the OC_ > which should be used for all iotivity macros to help prevent name collisions > with macros from external projects. Even with the prefix I think this is an > internal macro

Re: [dev] VERIFY_SUCCESS and other macros

2018-03-06 Thread Nash, George
-Original Message- From: iotivity-dev-boun...@lists.iotivity.org [mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Mats Wichmann Sent: Tuesday, March 6, 2018 8:38 AM To: iotivity-dev@lists.iotivity.org Subject: Re: [dev] VERIFY_SUCCESS and other macros On 03/06/2018 09:19 AM, Heldt

Re: [dev] VERIFY_SUCCESS and other macros

2018-03-06 Thread Mats Wichmann
On 03/06/2018 09:19 AM, Heldt-Sheller, Nathan wrote: > Hi Devs, > > I've noticed that we define macros (e.g. VERIFY_SUCCESS, and similar) in > several places, usually in the source file where it's being used. This seems > like a maintenance burden and bug risk (if two implementations differ, it