From 0f7acdc3a84eca01812cdf0e97a35b9b16c28845 Mon Sep 17 00:00:00 2001 From: hawke Date: Tue, 1 Feb 2005 10:04:32 +0000 Subject: 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 --- src/Registration.c | 54 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 18 deletions(-) (limited to 'src') 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++; } -- cgit v1.2.3