diff options
author | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2005-02-01 10:04:32 +0000 |
---|---|---|
committer | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2005-02-01 10:04:32 +0000 |
commit | 0f7acdc3a84eca01812cdf0e97a35b9b16c28845 (patch) | |
tree | 038530630e1759d76fbd4024cc6a33f43af94655 | |
parent | 3c8e852e2be559a3574c93b8932a98fc443fc9b2 (diff) |
Make the warning message about calling the registration too early more
verbose, so that you have some idea which thorn did it.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@85 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
-rw-r--r-- | src/Registration.c | 54 |
1 files changed, 36 insertions, 18 deletions
diff --git a/src/Registration.c b/src/Registration.c index 41bd70b..b5ee0df 100644 --- a/src/Registration.c +++ b/src/Registration.c @@ -170,9 +170,12 @@ CCTK_INT MoL_RegisterEvolved(CCTK_INT EvolvedIndex, CCTK_INT RHSIndex) if (!ScheduleStatus) { - CCTK_WARN(0, "MoL registration routine called too early!\n" - "Please ensure that all calls to MoL registration routines " - "occur within the \"MoL_Register\" timebin."); + CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, + "MoL registration routine called too early!\n" + "Trying to register variable '%s'," + "Please ensure that all calls to MoL registration routines " + "occur within the \"MoL_Register\" timebin.", + CCTK_VarName(EvolvedIndex)); retval++; } @@ -288,9 +291,12 @@ CCTK_INT MoL_RegisterConstrained(CCTK_INT ConstrainedIndex) if (!ScheduleStatus) { - CCTK_WARN(0, "MoL registration routine called too early!\n" - "Please ensure that all calls to MoL registration routines " - "occur within the \"MoL_Register\" timebin."); + CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, + "MoL registration routine called too early!\n" + "Trying to register variable '%s'," + "Please ensure that all calls to MoL registration routines " + "occur within the \"MoL_Register\" timebin.", + CCTK_VarName(ConstrainedIndex)); retval++; } @@ -398,9 +404,12 @@ CCTK_INT MoL_RegisterSaveAndRestore(CCTK_INT SandRIndex) if (!ScheduleStatus) { - CCTK_WARN(0, "MoL registration routine called too early!\n" - "Please ensure that all calls to MoL registration routines " - "occur within the \"MoL_Register\" timebin."); + CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, + "MoL registration routine called too early!\n" + "Trying to register variable '%s'," + "Please ensure that all calls to MoL registration routines " + "occur within the \"MoL_Register\" timebin.", + CCTK_VarName(SandRIndex)); retval++; } @@ -494,9 +503,12 @@ CCTK_INT MoL_RegisterEvolvedGroup(CCTK_INT EvolvedGroupIndex, if (!ScheduleStatus) { - CCTK_WARN(0, "MoL registration routine called too early!\n" - "Please ensure that all calls to MoL registration routines " - "occur within the \"MoL_Register\" timebin."); + CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, + "MoL registration routine called too early!\n" + "Trying to register group '%s'," + "Please ensure that all calls to MoL registration routines " + "occur within the \"MoL_Register\" timebin.", + CCTK_GroupName(EvolvedGroupIndex)); retval++; } @@ -593,9 +605,12 @@ CCTK_INT MoL_RegisterConstrainedGroup(CCTK_INT ConstrainedGroupIndex) if (!ScheduleStatus) { - CCTK_WARN(0, "MoL registration routine called too early!\n" - "Please ensure that all calls to MoL registration routines " - "occur within the \"MoL_Register\" timebin."); + CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, + "MoL registration routine called too early!\n" + "Trying to register group '%s'," + "Please ensure that all calls to MoL registration routines " + "occur within the \"MoL_Register\" timebin.", + CCTK_VarName(ConstrainedGroupIndex)); retval++; } @@ -687,9 +702,12 @@ CCTK_INT MoL_RegisterSaveAndRestoreGroup(CCTK_INT SandRGroupIndex) if (!ScheduleStatus) { - CCTK_WARN(0, "MoL registration routine called too early!\n" - "Please ensure that all calls to MoL registration routines " - "occur within the \"MoL_Register\" timebin."); + CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, + "MoL registration routine called too early!\n" + "Trying to register group '%s'," + "Please ensure that all calls to MoL registration routines " + "occur within the \"MoL_Register\" timebin.", + CCTK_VarName(SandRGroupIndex)); retval++; } |