[Nexus] NXopen ignores underlying function return

Akeroyd, FA (Freddie) F.A.Akeroyd at rl.ac.uk
Tue Jun 15 10:15:41 BST 2004


Tim,

The oversight you have spotted in NXopen has been fixed in the current
development version of the NeXus API (which you can access at
http://nexus.isis.rl.ac.uk/cgi-bin/viewcvs.cgi/) - this fix will be included
in the upcoming 2.1.0 official release of the NeXus API

Regards,

Freddie
 
> -----Original Message-----
> From: nexus-bounces at anl.gov [mailto:nexus-bounces at anl.gov] On Behalf Of
> Timothy Kelley
> Sent: 14 June 2004 20:35
> To: nexus at anl.gov
> Subject: [Nexus] NXopen ignores underlying function return
> 
> 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