diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-07-07 11:31:13 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-07-07 11:31:13 +0000 |
commit | daa76d74e152860de40c0e823a5e179794f2207a (patch) | |
tree | 7b1ff45b95653b3bc2e04833a7c96b84ba713346 /lib/sbin/GridFuncStuff.pl | |
parent | 4283e11fc2ba0973e3955c6c477c148b41375d48 (diff) |
Fixed error message.
Fixes Cactus/1128
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3257 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/GridFuncStuff.pl')
-rw-r--r-- | lib/sbin/GridFuncStuff.pl | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl index 163f9e36..baac7a93 100644 --- a/lib/sbin/GridFuncStuff.pl +++ b/lib/sbin/GridFuncStuff.pl @@ -1015,13 +1015,27 @@ sub CreateThornGroupInitialisers $dim = $rhinterface_db->{"\U$thorn GROUP $group\E DIM"}; $string = $rhinterface_db->{"\U$thorn GROUP $group\E SIZE"}; &CheckArraySizes($string,$thorn,$rhparameter_db,$rhinterface_db); - $numsize = ($string =~ s/,//g)+1; + if ($string !~ /,/) + { + $numsize = 0; + } + else + { + $numsize = ($string =~ s/,//g)+1; + } if ($dim != $numsize) { - $message = "Array dimension $dim doesn't match the $numsize array sizes "; + if ($numsize == 0) + { + $message = "Array sizes not provided for $group in $thorn"; + } + else + { + $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__); + } + $hint = "Array sizes must be comma separated list of $dim parameters"; + &CST_error(0,$message,$hint,__LINE__,__FILE__); } } |