diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-06-23 19:24:00 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-06-23 19:24:00 +0000 |
commit | 5164668ebbec8d33f03039c49321212e3e05000b (patch) | |
tree | 42a87405141e6ef9a05a09928b441be1dbd85b8c /lib/sbin/CreateScheduleBindings.pl | |
parent | 6083011322738fde28d265edb1360c3186034beb (diff) |
Patch from Yaakoub to give a better error message when lang is missing or
badly specified in a schedule block.
Fixes PR 1722.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3789 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CreateScheduleBindings.pl')
-rw-r--r-- | lib/sbin/CreateScheduleBindings.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/sbin/CreateScheduleBindings.pl b/lib/sbin/CreateScheduleBindings.pl index 8ed95540..525246e2 100644 --- a/lib/sbin/CreateScheduleBindings.pl +++ b/lib/sbin/CreateScheduleBindings.pl @@ -425,9 +425,18 @@ sub ScheduleBlock } else { - $mess = 'Unknown language ' .$rhschedule_db->{"\U$thorn\E BLOCK_$block LANG"}; - &CST_error(0,$mess,'',__LINE__,__FILE__); - return ('', ''); + if (!$rhschedule_db->{"\U$thorn\E BLOCK_$block LANG"}) + { + $mess = "Language not specified in schedule block: " .$rhschedule_db->{"\U$thorn\E BLOCK_$block NAME"} ." in thorn: $thorn"; + &CST_error(0,$mess,'',__LINE__,__FILE__); + return ('', ''); + } + else + { + $mess = 'Unknown language ' .$rhschedule_db->{"\U$thorn\E BLOCK_$block LANG"} ." in schedule block: ".$rhschedule_db->{"\U$thorn\E BLOCK_$block NAME"} ." in thorn: $thorn"; + &CST_error(0,$mess,'',__LINE__,__FILE__); + return ('', ''); + } } $prototype = "extern int $function(void);\n"; $buffer .= " CCTKi_ScheduleFunction((void *)$function,\n"; |