From ca8d9c109d76e8c024f21edd10474e0e5d29b892 Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 11 Oct 2005 16:41:15 +0000 Subject: [PATCH] die on error! -- Alex git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@700 a5681a0c-68f1-0310-ab6d-d61299d08faa --- examples/4charts.pl.in | 2 +- examples/bigtops.pl.in | 2 +- examples/minmax.pl.in | 2 +- examples/shared-demo.pl.in | 4 ++-- examples/stripes.pl.in | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/4charts.pl.in b/examples/4charts.pl.in index 828595c..a11b944 100755 --- a/examples/4charts.pl.in +++ b/examples/4charts.pl.in @@ -117,7 +117,7 @@ RRDs::graph "$name-sample.png", ; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; }; print "This script has created $name.png in the current directory\n"; diff --git a/examples/bigtops.pl.in b/examples/bigtops.pl.in index 0f5d98c..997386c 100755 --- a/examples/bigtops.pl.in +++ b/examples/bigtops.pl.in @@ -42,7 +42,7 @@ RRDs::graph "$name.png", ; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; }; diff --git a/examples/minmax.pl.in b/examples/minmax.pl.in index 1e94a6f..3714bc1 100755 --- a/examples/minmax.pl.in +++ b/examples/minmax.pl.in @@ -44,7 +44,7 @@ RRDs::graph "$name.png", ; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; }; diff --git a/examples/shared-demo.pl.in b/examples/shared-demo.pl.in index 6d9374f..f01c1ae 100755 --- a/examples/shared-demo.pl.in +++ b/examples/shared-demo.pl.in @@ -142,7 +142,7 @@ for (my $i=0;$i<$GRUNS;$i++) { "VRULE:".($now-7200)."#008877:120 Minutes ago"; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; } else { print "Image Size: ${xs}x${ys}\n"; print "Graph Return:\n",(join "\n", @$graphret),"\n\n"; @@ -154,7 +154,7 @@ for (my $i=0;$i<$GRUNS;$i++) { my ($start,$step,$names,$array) = RRDs::fetch $RRD1, "AVERAGE"; $ERROR = RRDs::error; -print "ERROR: $ERROR\n" if $ERROR ; +die "ERROR: $ERROR\n" if $ERROR ; print "start=$start, step=$step\n"; print " "; map {printf("%12s",$_)} @$names ; diff --git a/examples/stripes.pl.in b/examples/stripes.pl.in index 5187a56..362f499 100755 --- a/examples/stripes.pl.in +++ b/examples/stripes.pl.in @@ -38,7 +38,7 @@ RRDs::graph "stripes.png", "COMMENT:alpha=TIME,1200,%,600,LT,a,UNKN,IF", "COMMENT:beta=TIME,1200,%,600,GE,b,UNKN,IF\\j"; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; }; -- 2.11.0