summaryrefslogtreecommitdiff
path: root/lib/sbin/ScheduleParser.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-12-22 09:44:23 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-12-22 09:44:23 +0000
commit4e41b62d559f8fc381b58b0b79096b7214cf9ade (patch)
tree490fc8d64a87354db6f69df158f39a201e756042 /lib/sbin/ScheduleParser.pl
parent80933e40236dcf50807ebe6d6648eeab4848c538 (diff)
Enhancing error messages, especially for inconsistent implementations
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1981 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/ScheduleParser.pl')
-rw-r--r--lib/sbin/ScheduleParser.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/sbin/ScheduleParser.pl b/lib/sbin/ScheduleParser.pl
index 87186901..6c09552b 100644
--- a/lib/sbin/ScheduleParser.pl
+++ b/lib/sbin/ScheduleParser.pl
@@ -90,7 +90,7 @@ sub parse_schedule_ccl
($line_number,
$name, $as, $type, $description, $where, $language,
$mem_groups, $comm_groups, $trigger_groups, $sync_groups,
- $options,$before_list, $after_list, $while_list) = &ParseScheduleBlock($line_number, @data);
+ $options,$before_list, $after_list, $while_list) = &ParseScheduleBlock($thorn,$line_number, @data);
$schedule_db{"\U$thorn\E BLOCK_$n_blocks NAME"} = $name;
$schedule_db{"\U$thorn\E BLOCK_$n_blocks AS"} = $as;
@@ -147,7 +147,7 @@ sub parse_schedule_ccl
#@@*/
sub ParseScheduleBlock
{
- my($line_number, @data) = @_;
+ my($thorn,$line_number, @data) = @_;
my($name, $as, $type, $description, $where, $language,
$mem_groups, $comm_groups, $trigger_groups, $sync_groups,
$options, $before_list, $after_list, $while_list);
@@ -400,8 +400,12 @@ sub ParseScheduleBlock
{
if($language ne "")
{
- print STDERR "Error parsing schedule block line '$data[$line_number]'\n";
- print STDERR "Attempt to specify language more than once.\n";
+ $thisline = $data[$line_number];
+ $thisline =~ s/^\s*([^\s])\s$/$1/;
+ $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__);
}
else
{