[Nexus] NXopen ignores underlying function return

Timothy Kelley tkelley at caltech.edu
Mon Jun 14 20:34:31 BST 2004


Hello nexus folks,

NXopen (nexus version 2.0.0) does not test the return value from NX4open 
and NX5open (near lines 169 and 204 in napi.c). Even if NX4open or 
NX5open returns NX_ERROR, NXopen will return NX_OK. A simple solution:

NX4open( ...);
fHandle -> ... // many operations
return NX_OK;

might be replaced by

NXstatus status = NX4open( ...)
if( status == NX_OK)
{
    fHandle -> ...; // many operations
}
else
{
    some_error_handling(); // ?
}
return status;

and ditto for NX5open.

Regards,
Tim Kelley






More information about the NeXus mailing list