From 94b5f2068bb7d18d39aaa93dd644b07944d1ed4c Mon Sep 17 00:00:00 2001 From: schnetter Date: Mon, 28 Jun 2004 13:48:43 +0000 Subject: Print the variable name together with the variable index in an error message. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHInterp/trunk@80 1c20744c-e24a-42ec-9533-f5004cb800e5 --- src/InterpGridArrays.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/InterpGridArrays.c b/src/InterpGridArrays.c index b9873f7..ad53d8d 100644 --- a/src/InterpGridArrays.c +++ b/src/InterpGridArrays.c @@ -482,10 +482,13 @@ PUGHInterp_DriverInterpolate (CCTK_POINTER_TO_CONST const GH_, input_array_indices[i]); if (! input_arrays[i]) { + char * const fullname = CCTK_FullName (input_array_indices[i]); CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "Couldn't get data pointer of input array variable with " - "index %d timelevel %d", + "Couldn't get data pointer of input array variable '%s' " + "with index %d timelevel %d", + fullname ? fullname : "(illegal variable index)", input_array_indices[i], input_array_time_levels[i]); + free (fullname); retval = UTIL_ERROR_BAD_INPUT; continue; } -- cgit v1.2.3