diff options
author | rideout <rideout@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2003-12-03 21:48:43 +0000 |
---|---|---|
committer | rideout <rideout@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2003-12-03 21:48:43 +0000 |
commit | 3af4dbc1bda0e5da9175bf7cf3eecd5b3dcd1894 (patch) | |
tree | abadf9975dc076d85d93d505ffea7aaf8d44e422 /src/Output2D.c | |
parent | 8d9c801b413f28ef506952d0550de1471b2977a0 (diff) |
Provide level 1 warning if OutputVarAs() is called on an invalid variable name.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@153 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src/Output2D.c')
-rw-r--r-- | src/Output2D.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Output2D.c b/src/Output2D.c index a830e42..7d046a9 100644 --- a/src/Output2D.c +++ b/src/Output2D.c @@ -117,7 +117,12 @@ int IOASCII_Output2DVarAs (const cGH *GH, const char *fullname, const char *alia retval = -1; vindex = CCTK_VarIndex (fullname); - if (CheckOutputVar (vindex) == 0) + if (vindex<0) + { + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "There is no such variable %s. Ignoring IOASCII 2D output.", + fullname); + } else if (CheckOutputVar (vindex) == 0) { retval = IOASCII_Write2D (GH, vindex, alias); } |