diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-08-19 12:52:15 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-08-19 12:52:15 +0000 |
commit | 1cfc38d8c540f57cafb20b0b6316637c29dfbab9 (patch) | |
tree | 79ef7e954c6deca80b097e74528151eb2eabacd7 /lib/sbin/CSTUtils.pl | |
parent | f1d4f49a673caa29c981e7d8fce25a835fce224f (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
Diffstat (limited to 'lib/sbin/CSTUtils.pl')
-rw-r--r-- | lib/sbin/CSTUtils.pl | 23 |
1 files changed, 14 insertions, 9 deletions
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; |