diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-06-07 15:37:39 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-06-07 15:37:39 +0000 |
commit | 59ca559428ff3e39429c038cdb31be9ac6324ddd (patch) | |
tree | 4368a1cb4b884ef5f6629bf808990d05bad1bdc7 /src/main/ProcessParameterDatabase.c | |
parent | b317816e18643432468b558a08bc76b001fc024e (diff) |
Change labelling of error messages for problems with parameter files
to avoid confusion with standard warning levels. Tidied errors to
handle the difference between 1 or more errors with better grammar.
Fixes Cactus/1500
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3236 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/ProcessParameterDatabase.c')
-rw-r--r-- | src/main/ProcessParameterDatabase.c | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/src/main/ProcessParameterDatabase.c b/src/main/ProcessParameterDatabase.c index 298103f9..2dd0fe2e 100644 --- a/src/main/ProcessParameterDatabase.c +++ b/src/main/ProcessParameterDatabase.c @@ -60,6 +60,7 @@ void CCTKi_SetParameterSetMask (int mask); int CCTKi_ProcessParameterDatabase (tFleshConfig *ConfigData) { int parse_errors; + int major, minor; FILE *parameter_file; @@ -90,18 +91,40 @@ int CCTKi_ProcessParameterDatabase (tFleshConfig *ConfigData) "parameter file", parse_errors); } - if (CCTKi_NumParameterFileErrors (1)) + minor = CCTKi_NumParameterFileErrors(1); + if (minor) { - CCTK_VWarn (1, __LINE__, __FILE__, "Cactus", - "CCTKi_SetParameterSetMask: %d level 1 errors in " - "parameter file", CCTKi_NumParameterFileErrors (1)); + if (minor > 1) + { + CCTK_VWarn (1, __LINE__, __FILE__, "Cactus", + "CCTKi_SetParameterSetMask: %d minor errors in " + "parameter file", CCTKi_NumParameterFileErrors (1)); + } + else + { + CCTK_VWarn (1, __LINE__, __FILE__, "Cactus", + "CCTKi_SetParameterSetMask: %d minor error in " + "parameter file", CCTKi_NumParameterFileErrors (1)); + } + } - if (CCTKi_NumParameterFileErrors (0)) + major = CCTKi_NumParameterFileErrors (0); + if (major) { - CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", - "CCTKi_SetParameterSetMask: %d level 0 errors in " - "parameter file", CCTKi_NumParameterFileErrors (0)); + if (major > 1) + { + CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", + "CCTKi_SetParameterSetMask: %d major errors in " + "parameter file", CCTKi_NumParameterFileErrors (0)); + } + else + { + CCTK_VWarn (0, __LINE__, __FILE__, "Cactus", + "CCTKi_SetParameterSetMask: %d major error in " + "parameter file", CCTKi_NumParameterFileErrors (0)); + } + } } else |