Re: Guidelines for use of Status and out parameters

2018-03-20 Thread Wes McKinney
Yes, the general guideline is to use Status (in C++ APIs) for exceptional behavior that is out of the control of the user of the C++ APIs. We have been trying to not use Status to make assertions that the developer has invoked the API correctly -- instead preconditions and other such checks should

Re: Guidelines for use of Status and out parameters

2018-03-20 Thread Uwe L. Korn
Hello, the general rule is: Use a Status as return value when you would throw an exception, otherwise return the value directly. In the case where a DCHECK is sufficient and no method is called that would return a Status, we should get rid of the Status return. For the AddField case it would be