proposed minor change to iBase

Carl Ollivier-Gooch cfog at mech.ubc.ca
Fri Nov 6 15:26:42 CST 2009


Mark Miller wrote:
> On Tue, 2009-11-03 at 23:47, Carl Ollivier-Gooch wrote:
> 
>> Also, it got me thinking about iMesh_getDescription, which I looked up.
>>
>> There are two possible interpretations here:
>>
>> 1.  An app hits an error code and asks for a description of it; the 
>> implementation has a string for each error code.  This would presumably 
>> take a "/*in*/ int err".
> 
> I believe this is what I have understood this function to do. Was I
> interpreting it wrong?

Opinions differ.

> Also, I thought I recall hitting a case where 'getDescription()' itself
> encountered error and, returned a different error code than what was
> passed in. Maybe it detected the 'string not long enough for return
> value' case? I don't know. But, that is yet another behavior to clarify.

At the very least, getDescription almost by definition has to return 
error-free, even if that implies chopping a string short.

Also, is there any point in keeping getError?  This is another holdover 
from the days when SIDL would throw an exception and you had to check to 
see what it was.  This function can only return the error code (which 
was already returned), so why bother?

Carl

-- 
------------------------------------------------------------------------
Dr. Carl Ollivier-Gooch, P.Eng.                   Voice: +1-604-822-1854
Associate Professor                                 Fax: +1-604-822-2403
Department of Mechanical Engineering             email: cfog at mech.ubc.ca
University of British Columbia              http://www.mech.ubc.ca/~cfog
Vancouver, BC  V6T 1Z4                  http://tetra.mech.ubc.ca/ANSLab/
------------------------------------------------------------------------


More information about the tstt-interface mailing list