summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-08-19 12:52:15 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-08-19 12:52:15 +0000
commit1cfc38d8c540f57cafb20b0b6316637c29dfbab9 (patch)
tree79ef7e954c6deca80b097e74528151eb2eabacd7
parentf1d4f49a673caa29c981e7d8fce25a835fce224f (diff)
Adding a "help" argument to the CST_error call to start adding suggested causes for the errors.
At the moment the help message is always shown, since I've only added a couple so far. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2307 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/BuildHeaders.pl4
-rw-r--r--lib/sbin/CST10
-rw-r--r--lib/sbin/CSTUtils.pl23
-rw-r--r--lib/sbin/CreateFunctionBindings.pl16
-rw-r--r--lib/sbin/CreateParameterBindings.pl2
-rw-r--r--lib/sbin/CreateScheduleBindings.pl32
-rw-r--r--lib/sbin/GridFuncStuff.pl18
-rw-r--r--lib/sbin/ScheduleParser.pl23
-rw-r--r--lib/sbin/create_c_stuff.pl2
-rw-r--r--lib/sbin/create_fortran_stuff.pl2
-rw-r--r--lib/sbin/interface_parser.pl56
-rw-r--r--lib/sbin/parameter_parser.pl42
12 files changed, 116 insertions, 114 deletions
diff --git a/lib/sbin/BuildHeaders.pl b/lib/sbin/BuildHeaders.pl
index 7fed11d4..91507980 100644
--- a/lib/sbin/BuildHeaders.pl
+++ b/lib/sbin/BuildHeaders.pl
@@ -66,7 +66,7 @@ sub BuildHeaders
else
{
$message = "Include file $inc_file1 not found in $arrangement/$thorn\n";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$data{"$inc_file2"} .= "/* End of include header file $inc_file1 from $thorn */\n";
}
@@ -94,7 +94,7 @@ sub BuildHeaders
else
{
$message = "Include file $inc_file1 not found in $arrangement/$thorn\n";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$data{"$inc_file2"} .= "#ifdef FCODE\n";
diff --git a/lib/sbin/CST b/lib/sbin/CST
index 2694eebb..18c36955 100644
--- a/lib/sbin/CST
+++ b/lib/sbin/CST
@@ -6,7 +6,7 @@
# @desc
# Parses the the configuration files for thorns.
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.44 2001-07-11 21:44:53 allen Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.45 2001-08-19 12:52:13 allen Exp $
#@@*/
# Global parameter to track the number of errors from the CST
@@ -262,12 +262,12 @@ sub CreateThornList
if ($package ne $1)
{
$message = "Duplicate thornname $thorn_name in $1 and $package";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
else
{
$message = "Ignoring duplicate thorn $package/$thorn_name";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
}
}
else
@@ -278,14 +278,14 @@ sub CreateThornList
else
{
$message = "$thorn - missing ccl file(s)\n";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
next;
}
}
else
{
$message = "Missing thorn $thorn\n";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
diff --git a/lib/sbin/CSTUtils.pl b/lib/sbin/CSTUtils.pl
index afff5150..d7abd49f 100644
--- a/lib/sbin/CSTUtils.pl
+++ b/lib/sbin/CSTUtils.pl
@@ -11,7 +11,12 @@
sub CST_error
{
- my($level,$mess,$line,$file,$error) = @_;
+ my($level,$mess,$help,$line,$file,$error) = @_;
+
+ if ($help ne /$\s*^/)
+ {
+ $help = " HINT: $help\n";
+ }
if ($full_warnings)
{
@@ -19,14 +24,14 @@ sub CST_error
{
$CST_errors++;
$error = "\nCST error in $file (at $line)\n -> $mess\n";
- print STDERR $error;
- $error_string .= $error;
+ print STDERR "$error\n";
+ $error_string .= "$error$help\n";
}
else
{
$error = "\nCST warning in $file (at $line)\n -> $mess\n";
- print STDERR $error;
- $error_string .= $error;
+ print STDERR "$error\n";
+ $error_string .= "$error$help\n";
}
}
else
@@ -35,14 +40,14 @@ sub CST_error
{
$CST_errors++;
$error = "\nCST error $CST_errors:\n -> $mess\n";
- print STDERR $error;
- $error_string .= $error;
+ print STDERR "$error\n";
+ $error_string .= "$error$help\n";
}
else
{
$error = "\nCST warning:\n -> $mess\n";
- print STDERR $error;
- $error_string .= $error;
+ print STDERR "$error\n";
+ $error_string .= "$error$help\n";
}
}
return;
diff --git a/lib/sbin/CreateFunctionBindings.pl b/lib/sbin/CreateFunctionBindings.pl
index 81783003..cbb28b93 100644
--- a/lib/sbin/CreateFunctionBindings.pl
+++ b/lib/sbin/CreateFunctionBindings.pl
@@ -1095,12 +1095,12 @@ sub FunctionDatabase
if ($types ne $function_db->{"$function TYPES"})
{
$message = "Argument types for aliased $function do not match";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
if ($inret ne $function_db->{"$function RET"})
{
$message = "Return types for aliased $function do not match";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
else
@@ -1124,14 +1124,14 @@ sub FunctionDatabase
{
$function_db->{"$function LANG"} = "C";
$message = "Fortran wrapper not created for alias $function";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
}
}
else
{
$function_db->{"$function LANG"} = "";
$message = "Can't create alias for $function";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
if ($rhinterface_db->{"\U$thorn FUNCTION\E $function RET"} eq "void")
@@ -1169,12 +1169,12 @@ sub FunctionDatabase
if ($types ne $function_db->{"$function TYPES"})
{
$message = "Argument types for aliased $function do not match";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
if ($inret ne $function_db->{"$function RET"})
{
$message = "Return types for aliased $function do not match";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
$function_db->{"PROVIDED FUNCTIONS"} .= "$function ";
@@ -1187,7 +1187,7 @@ sub FunctionDatabase
if ($function_db->{"PROVIDED FUNCTIONS"} !~ / $function /)
{
$message = "Aliased function $function is not provided by any thorn";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
}
}
@@ -1283,7 +1283,7 @@ sub ParseArguments
$fortran = 0;
$c = 0;
$message = "Error parsing aliased function argument $arg";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
}
}
diff --git a/lib/sbin/CreateParameterBindings.pl b/lib/sbin/CreateParameterBindings.pl
index bb7dbe58..f0405528 100644
--- a/lib/sbin/CreateParameterBindings.pl
+++ b/lib/sbin/CreateParameterBindings.pl
@@ -583,7 +583,7 @@ sub CreateParameterRegistrationStuff
else
{
$message = "Illegal steerable type ($steerable) for parameter $parameter in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$line=" CCTKi_ParameterCreate(\"$parameter\", /* The parameter name */\n".
diff --git a/lib/sbin/CreateScheduleBindings.pl b/lib/sbin/CreateScheduleBindings.pl
index 8af20e87..860ddedb 100644
--- a/lib/sbin/CreateScheduleBindings.pl
+++ b/lib/sbin/CreateScheduleBindings.pl
@@ -530,8 +530,8 @@ sub ScheduleBlock
}
else
{
- $mess = "Unknown language " .$rhschedule_db->{"\U$thorn\E BLOCK_$block LANG"} ."\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Unknown language " .$rhschedule_db->{"\U$thorn\E BLOCK_$block LANG"};
+ &CST_error(0,$mess,"",__LINE__,__FILE__);
return ("", "");
}
$prototype = "extern int $function(void); /* Note that this is a cheat, we just need a function pointer. */\n";
@@ -541,8 +541,8 @@ sub ScheduleBlock
}
else
{
- $mess = "Internal error: Unknown schedule block type " . $rhschedule_db->{"\U$thorn\E BLOCK_$block TYPE"} . "\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Internal error: Unknown schedule block type " . $rhschedule_db->{"\U$thorn\E BLOCK_$block TYPE"};
+ &CST_error(0,$mess,"",__LINE__,__FILE__);
return ("", "");
}
@@ -629,8 +629,8 @@ sub ScheduleStatement
else
{
- $mess = "Unknown statement type '" .$rhschedule_db{"\U$thorn\E STATEMENT_$statement TYPE"} ."'\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Unknown statement type '" .$rhschedule_db{"\U$thorn\E STATEMENT_$statement TYPE"};
+ &CST_error(0,$mess,"",__LINE__,__FILE__);
return ("", "");
}
@@ -687,8 +687,9 @@ sub ScheduleSelectGroups
}
else
{
- $mess = "Schedule error: Thorn $thorn - group $group doesn't exist.\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Schedule error: Thorn $thorn - group $other_imp\:\:$group doesn't exist.";
+ $help = "Check thorn $thorn inherits from implementation $other_imp";
+ &CST_error(0,$mess,$help,__LINE__,__FILE__);
next;
}
@@ -702,8 +703,8 @@ sub ScheduleSelectGroups
}
else
{
- $mess = "Schedule error: Thorn $thorn - group $group doesn't exist.\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Schedule error: Thorn $thorn - group $other_imp\:\:$group doesn't exist.\n";
+ &CST_error(0,$mess,"",__LINE__,__FILE__);
next;
}
}
@@ -754,15 +755,18 @@ sub ScheduleSelectGroups
}
if(! $foundit)
{
- $mess = "Schedule error: Thorn $thorn - group $group doesn't exist.\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Schedule error: Thorn $thorn - group $group doesn't exist.";
+ $help = "Check $group really is in thorn $thorn. Groups from other thorns ";
+ $help .= "need to be specified using \$implementation\:\:\$group and ";
+ $help .= "$implementation must be inheritied by your thorn.";
+ &CST_error(0,$mess,$help,__LINE__,__FILE__);
}
}
else
{
- $mess = "Schedule error: Thorn $thorn - group $group doesn't exist.\n";
- &CST_error(0,$mess,__LINE__,__FILE__);
+ $mess = "Schedule error: Thorn $thorn - group $group doesn't exist.";
+ &CST_error(0,$mess,"",__LINE__,__FILE__);
}
}
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl
index af4d407b..3cf5967a 100644
--- a/lib/sbin/GridFuncStuff.pl
+++ b/lib/sbin/GridFuncStuff.pl
@@ -351,14 +351,14 @@ sub CreateFortranArgumentDeclarations
# DEPRECATED IN BETA 10
if($type eq 'CHAR')
{
- &CST_error(1,"CCTK_CHAR is replaced by CCTK_BYTE, please change your code",__LINE__,__FILE__);
+ &CST_error(1,"CCTK_CHAR is replaced by CCTK_BYTE, please change your code","",__LINE__,__FILE__);
}
push(@declarations, "CCTK_$type $argument$suffix$dimensions");
}
else
{
- &CST_error(0,"Unknown argument type \"$type\"",__LINE__,__FILE__);
+ &CST_error(0,"Unknown argument type \"$type\"","",__LINE__,__FILE__);
}
}
}
@@ -424,14 +424,14 @@ sub CreateCArgumentDeclarations
# DEPRECATED IN BETA 10 */
if($type eq 'CHAR')
{
- &CST_error(1,"CCTK_CHAR is replaced by CCTK_BYTE, please change your code",__LINE__,__FILE__);
+ &CST_error(1,"CCTK_CHAR is replaced by CCTK_BYTE, please change your code","",__LINE__,__FILE__);
}
push(@declarations, "CCTK_$type *$argument$suffix=(CCTK_$type *)(cctkGH->data[CCTK_VarIndex(\"$thorn\::$argument\")][$levelmone]);");
}
else
{
- &CST_error(0,"Unknown argument type $type",__LINE__,__FILE__);
+ &CST_error(0,"Unknown argument type $type","",__LINE__,__FILE__);
}
}
}
@@ -712,7 +712,7 @@ sub CreateCArgumentPrototype
}
else
{
- &CST_error(0,"Unknown argument type $type",__LINE__,__FILE__);
+ &CST_error(0,"Unknown argument type $type","",__LINE__,__FILE__);
}
}
}
@@ -780,7 +780,7 @@ sub CreateCArgumentList
# DEPRECATED IN BETA 10
if($type eq 'CHAR')
{
- &CST_error(1,"CCTK_CHAR is replaced by CCTK_BYTE, please change your code",__LINE__,__FILE__);
+ &CST_error(1,"CCTK_CHAR is replaced by CCTK_BYTE, please change your code","",__LINE__,__FILE__);
}
$arglist .= "$sep"."(CCTK_$type *)(CCTKARGNUM_$argument<0 ? NULL : (xGH)->data[CCTKARGNUM_$argument][$level-1])";
@@ -788,7 +788,7 @@ sub CreateCArgumentList
}
else
{
- &CST_error(0,"Unknown argument type $type",__LINE__,__FILE__);
+ &CST_error(0,"Unknown argument type $type","",__LINE__,__FILE__);
}
}
}
@@ -1150,7 +1150,7 @@ sub CreateThornGroupInitialisers
$message = "Array dimension $dim doesn't match the $numsize array sizes ";
$message .= "\n ($rhinterface_db->{\"\U$thorn GROUP $group\E SIZE\"}) for $group in $thorn";
$message .= "\n (Array sizes must be comma separated list of parameters)";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -1274,7 +1274,7 @@ sub CheckArraySizes
if ($gotit == 0)
{
$message = "Array size $par in $thorn is not a parameter";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
diff --git a/lib/sbin/ScheduleParser.pl b/lib/sbin/ScheduleParser.pl
index 6c09552b..dd204546 100644
--- a/lib/sbin/ScheduleParser.pl
+++ b/lib/sbin/ScheduleParser.pl
@@ -255,8 +255,7 @@ sub ParseScheduleBlock
if($keyword ne "")
{
$message = "Error parsing schedule block line '$data[$line_number]'\n";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$keyword = "BEFORE";
$field++;
@@ -266,8 +265,7 @@ sub ParseScheduleBlock
if($keyword ne "")
{
$message="Error parsing schedule block line '$data[$line_number]'\n";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$keyword = "AFTER";
$field++;
@@ -277,8 +275,7 @@ sub ParseScheduleBlock
if($keyword ne "")
{
$message="Error parsing schedule block line '$data[$line_number]'\n";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$keyword = "WHILE";
$field++;
@@ -348,8 +345,7 @@ sub ParseScheduleBlock
else
{
$message="Error parsing schedule block line '$data[$line_number]'\n";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$keyword = "";
$field++;
}
@@ -367,8 +363,7 @@ sub ParseScheduleBlock
if($data[$line_number] !~ m:\s*\{\s*:)
{
$message="Error parsing schedule block line '$data[$line_number]'\nMissing { at start of block\n";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$line_number++ while($data[$line_number] !~ m:\s*\}\s*:);
}
else
@@ -405,7 +400,7 @@ sub ParseScheduleBlock
$message = "Error parsing schedule block in $thorn\n";
$message .= "Attempt to specify language more than once\n";
$message .= "Line: $thisline";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
else
{
@@ -419,8 +414,7 @@ sub ParseScheduleBlock
else
{
$message = "Error parsing schedule block line '$data[$line_number]'\nUnrecognised statement";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
@@ -431,8 +425,7 @@ sub ParseScheduleBlock
else
{
$message = "Error: Missing description at end of schedule block\n";
- &CST_error(0,$message,__LINE,__FILE__);
- $CST_errors++;
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
# Turn the arrays into strings.
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl
index 88e13b86..e7b55566 100644
--- a/lib/sbin/create_c_stuff.pl
+++ b/lib/sbin/create_c_stuff.pl
@@ -145,7 +145,7 @@ sub get_c_type_string
else
{
$message = "Unknown parameter type '$type'";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
return $type_string;
diff --git a/lib/sbin/create_fortran_stuff.pl b/lib/sbin/create_fortran_stuff.pl
index 1966c876..c207574b 100644
--- a/lib/sbin/create_fortran_stuff.pl
+++ b/lib/sbin/create_fortran_stuff.pl
@@ -194,7 +194,7 @@ sub get_fortran_type_string
else
{
$message = "Unknown parameter type '$type'";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
return $type_string;
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl
index 3683fcdb..262a6956 100644
--- a/lib/sbin/interface_parser.pl
+++ b/lib/sbin/interface_parser.pl
@@ -85,7 +85,7 @@ sub cross_index_interface_data
if($implementation =~ m:^\s*$:)
{
$message = "Thorn $thorn doesn't specify an implementation";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
next;
}
@@ -212,7 +212,7 @@ sub get_implementation_friends
if(! $interface_data{"IMPLEMENTATION \U$friend\E THORNS"})
{
$message = "$implementation is friends with $friend - non-existent implementation";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
next;
}
%friends = &get_implementation_friends($friend, scalar(keys %friends), %friends,%interface_data);
@@ -281,7 +281,7 @@ sub get_implementation_ancestors
{
$message .= " No thorns in arrangements directory implement $ancestor";
}
- &CST_error(0,$message,__LINE,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
next;
}
@@ -394,7 +394,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation. \n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Not all inherit: $thing";
- &CST_error(0,$message,__LINE,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -407,7 +407,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Not all are friends of: $thing";
- &CST_error(0,$message,__LINE,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -420,7 +420,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Not all declare public group: $thing";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -433,7 +433,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Not all declare protected group: $thing";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -468,7 +468,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent variable type";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -485,7 +485,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent group type";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -502,7 +502,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent time levels";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -519,7 +519,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent size";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -536,7 +536,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent ghostsize";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -553,7 +553,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= " Group $group has inconsistent distribution";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -570,7 +570,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent dimension";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -587,7 +587,7 @@ sub check_implementation_consistency
$message = "Inconsistent implementations of $implementation\n";
$message .= "Implemented by thorns " . join(" ", @thorns) . "\n";
$message .= "Group $group has inconsistent staggering type";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$n_errors++;
}
}
@@ -647,7 +647,7 @@ sub check_interface_consistency
if ($interface_data{"\U$ancestor_thorn\E PUBLIC GROUPS"} =~ $private_group)
{
$message = "Private group $private_group in thorn $thorn has same name as \n public group in ancestor implementation $ancestor_imp (e.g. thorn $ancestor_thorn)";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
@@ -716,7 +716,7 @@ sub parse_interface_ccl
else
{
$message = "Only one implements line allowed in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
# implementation names can be sepeated by ,\s, where , are stripped out below
@@ -798,11 +798,11 @@ sub parse_interface_ccl
if($known_groups{"\U$current_group\E"})
{
$message = "Duplicate group $3 in thorn $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
if($data[$line_number+1] =~ m:\{:)
{
$message = "Skipping interface block";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
next;
@@ -853,7 +853,7 @@ sub parse_interface_ccl
else
{
$message = "Unknown option $option in group $current_group of thorn $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -894,11 +894,11 @@ sub parse_interface_ccl
$message = "Unknown GROUP TYPE " .
$interface_db{"\U$thorn GROUP $current_group\E GTYPE"} .
" for group $current_group of thorn $thorn";
- &CST_error(0,$message,__LINE,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
if($data[$line_number+1] =~ m:\{:)
{
$message = "Skipping interface block in $thorn";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
next;
@@ -910,11 +910,11 @@ sub parse_interface_ccl
$message = "Unknown DISTRIB TYPE " .
$interface_db{"\U$thorn GROUP $current_group\E DISTRIB"} .
" for group $current_group of thorn $thorn";
- &CST_error(0,$message,__LINE,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
if($data[$line_number+1] =~ m:\{:)
{
$message = "Skipping interface block in $thorn";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
next;
@@ -943,7 +943,7 @@ sub parse_interface_ccl
else
{
$message = "Duplicate variable $function in thorn $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
@@ -963,7 +963,7 @@ sub parse_interface_ccl
else
{
$message = "Duplicate variable $function in thorn $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
# Decrement the line number, since the line is the first line of the next CCL statement.
@@ -1000,14 +1000,14 @@ sub parse_interface_ccl
if($line =~ m:\{:)
{
$message = "...Skipping interface block with missing keyword....";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
else
{
$message = "Unknown line in thorn $arrangement/$thorn\n$line";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl
index 95053568..34e23e02 100644
--- a/lib/sbin/parameter_parser.pl
+++ b/lib/sbin/parameter_parser.pl
@@ -71,7 +71,7 @@ sub cross_index_parameters
if($public_parameters{"\U$parameter\E"})
{
$message = "Duplicate public parameter $parameter, defined in $imp and ".$public_parameters{"\Uparameter\E"};
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
else
{
@@ -174,7 +174,7 @@ sub parse_param_ccl
else
{
$message = "Missing description for $variable in thorn $thorn.";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -182,7 +182,7 @@ sub parse_param_ccl
{
$message = "Duplicate parameter $variable in thorn $thorn. Ignoring second definition";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
@@ -190,7 +190,7 @@ sub parse_param_ccl
{
# Can only extend a friend variable.
$message = "Parse error in $thorn/param.ccl";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
elsif($data[$line_number+1] !~ m:^\s*\{\s*$: && $use_clause == 0)
@@ -198,7 +198,7 @@ sub parse_param_ccl
# Since the data should have no blank lines, the next
# line should have { on it.
$message = "Parse error in $thorn/param.ccl - missing \"{\" in definition of parameter \"$variable\"";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
# Move past the end of this block.
$line_number++ until ($data[$line_number] =~ m:\}:);
}
@@ -216,7 +216,7 @@ sub parse_param_ccl
{
# This message is already given above.
# message = "Missing { at start of range block for parameter $variable pf thorn $thorn";
-# &CST_error(0,$message,__LINE__,__FILE__);
+# &CST_error(0,$message,"",__LINE__,__FILE__);
die "Internal error in parser: this line should never be reached."
}
}
@@ -239,7 +239,7 @@ sub parse_param_ccl
else
{
$message = "Unknown option $option for parameter $variable of thorn $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -279,12 +279,12 @@ sub parse_param_ccl
if($delim eq "" || ($delim =~ /::/ && $new_desc =~ /^\s*$/))
{
$message = "Missing description of range '$new_ranges' for parameter $thorn\::$variable";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
}
elsif ($new_desc =~ /^\s*\".*[^\s\"]\s*$|^\s*[^\s\"].*\"\s*$/)
{
$message = "Description of range for $thorn\::$variable has misplaced quotes ($new_desc)";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$parameter_db{"\U$thorn $variable\E range $parameter_db{\"\U$thorn $variable\E ranges\"} description"} = $new_desc;
$line_number++;
@@ -295,7 +295,7 @@ sub parse_param_ccl
if (($use_clause == 0) && ($parameter_db{"\U$thorn $variable\E ranges"}==0 && $type =~ m:INT|REAL:))
{
$message = "No range given for $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
if($block !~ m:SHARES:)
{
@@ -305,17 +305,17 @@ sub parse_param_ccl
if ($type =~ m:INT|REAL: && $default =~ m:":)
{
$message = "String default given for $type $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
elsif ($type =~ m:STRING|KEYWORD: && $default !~ m:".*":)
{
$message = "Default given for $type $variable in $thorn is not a string";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
elsif ($type =~ m:BOOLEAN: && $default =~ m:": && $default !~ m:".*":)
{
$message = "Default given for $type $variable in $thorn is missing a quote";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
$default = $1 if ($default =~ m:\"(((\\\")|[^\"])*)\":);
@@ -327,7 +327,7 @@ sub parse_param_ccl
else
{
$message = "Unable to find default for $variable";
- &CST_error(0,$message,__LINE,__FILE);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
@@ -337,13 +337,13 @@ sub parse_param_ccl
if($line =~ m:\{:)
{
$message = "Skipping parameter block in $thorn with missing keyword";
- &CST_error(1,$message,__LINE__,__FILE__);
+ &CST_error(1,$message,"",__LINE__,__FILE__);
$line_number++ until ($data[$line_number] =~ m:\}:);
}
else
{
$message = "Unknown line \"$line\" in $thorn/param.ccl";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
}
@@ -437,7 +437,7 @@ sub CheckParameterDefault
if ($default !~ m:^yes|no|1|0$:i)
{
$message = "Default ($default) for boolean incorrect for $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -462,7 +462,7 @@ sub CheckParameterDefault
if ($foundit == 0)
{
$message = "Default ($default) for keyword incorrect for $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -486,7 +486,7 @@ sub CheckParameterDefault
if ($foundit == 0)
{
$message = "Default ($default) for string incorrect for $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -529,7 +529,7 @@ sub CheckParameterDefault
if ($foundit == 0)
{
$message = "Default ($default) for integer incorrect for $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}
@@ -572,7 +572,7 @@ sub CheckParameterDefault
if ($foundit == 0)
{
$message = "Default ($default) for real incorrect for $variable in $thorn";
- &CST_error(0,$message,__LINE__,__FILE__);
+ &CST_error(0,$message,"",__LINE__,__FILE__);
}
}