diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-04 12:00:26 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-04 12:00:26 +0000 |
commit | 3343fabf7984cad8781b7163f16688456deb9ca0 (patch) | |
tree | bb1dfe006d5bc200e0585e08b5dae8b9ea0fdc18 | |
parent | 2cc8bea61aeb886a4fc6f85f22aae788664b495d (diff) |
Contains CST_error(level,message,line,file);
git-svn-id: http://svn.cactuscode.org/flesh/trunk@627 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/sbin/CSTUtils.pl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/sbin/CSTUtils.pl b/lib/sbin/CSTUtils.pl new file mode 100644 index 00000000..1b8b940e --- /dev/null +++ b/lib/sbin/CSTUtils.pl @@ -0,0 +1,34 @@ +sub CST_error +{ + local($level,$mess,$line,$file) = @_; + + if ($full_warnings) + { + if ($level == 0) + { + $CST_errors++; + print STDERR "CST error in $file (at $line)\n"; + print STDERR " -> $mess\n"; + } + else + { + print STDERR "CST warning in $file (at $line)\n"; + print STDERR " -> $mess\n"; + } + } + else + { + if ($level == 0) + { + $CST_errors++; + print STDERR "CST error $CST_errors:\n -> $mess\n"; + } + else + { + print STDERR "CST warning:\n -> $mess\n"; + } + } + return; +} + +1; |