[EMAIL PROTECTED] said:
> Only change the error if it doesn't exist. The way it was it always
> changed the error message. 

Is there a document available that teaches you this kind of practices in 
OpenDX? Some kind of guide-lines or practices used? I looked on the OpenDX.org
web page, but didn't find anything. I didn't find anything in the source tree
either (but didn't look to hard).

By the way, I think the change only made it to the dx-4-2-0 branch and not
the main tree, was that intentional?


smeds> cvs log -r1.13.2.3  import_ncdf.c

RCS file: /src/master/dx/src/exec/dxmods/import_ncdf.c,v
Working file: import_ncdf.c
head: 1.14
branch:
locks: strict
access list:
symbolic names:
        libtool: 1.13.0.2
        prelibtool: 1.13
        dx-4-2-0: 1.13
        dx-4-1-3: 1.12
        dx-4-1-2: 1.12
        dx-4-1-0: 1.8
        dx-4-0-10: 1.7
        dx-4-0-9: 1.7
        dx-4-0-6: 1.7
        dx-4-0-5: 1.6
        dx-4-0-4: 1.6
        dx-4-0-3: 1.6
        dx-4-0-2: 1.6
        start: 1.1.1.1
        dx: 1.1.1
keyword substitution: kv
total revisions: 18;    selected revisions: 1
description:
----------------------------
revision 1.13.2.3
date: 2002/10/10 00:01:28;  author: davidt;  state: Exp;  lines: +1 -1
Only change the error if it doesn't exist. The way it was it
always changed the error message.
=============================================================================

smeds> cvs diff -rHEAD -r1.13.2.3 import_ncdf.c 
Index: import_ncdf.c
===================================================================
RCS file: /src/master/dx/src/exec/dxmods/import_ncdf.c,v
retrieving revision 1.14
retrieving revision 1.13.2.3
diff -r1.14 -r1.13.2.3
301,303c301,302
<         /* add any Global Attributes */
<       if (!o)
<           DXWarning("Nothing has been imported.  Did you use OpenDX-compliant 
netcdf file conventions?");
---
>       if( !o )
>         DXWarning("Nothing has been imported. Did you use a OpenDX-compliant 
> netCDF file convention?");
305c304
<           getglobalattr(o,vp);
---
>         getglobalattr(o,vp);
1636,1642c1635,1639
< 
<   if (! o)
<   {
<     if (DXGetError() != ERROR)
<       DXErrorReturn(ERROR_INTERNAL, "getglobalattr called with NULL object");
<     return ERROR;
<   }
---
>  
>       if( !o ) {
>               if (DXGetError() == ERROR_NONE)
>               DXErrorReturn(ERROR_INTERNAL,"getglobalattr called without a 
> proper object");
>       }

Reply via email to