From 7b90fdaed2d0fe9f36ade9257bf1d750f15972b3 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@700 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/examples/4charts.pl.in | 2 +- program/examples/bigtops.pl.in | 2 +- program/examples/minmax.pl.in | 2 +- program/examples/shared-demo.pl.in | 4 ++-- program/examples/stripes.pl.in | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/program/examples/4charts.pl.in b/program/examples/4charts.pl.in index 828595cf..a11b9441 100755 --- a/program/examples/4charts.pl.in +++ b/program/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/program/examples/bigtops.pl.in b/program/examples/bigtops.pl.in index 0f5d98cc..997386c5 100755 --- a/program/examples/bigtops.pl.in +++ b/program/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/program/examples/minmax.pl.in b/program/examples/minmax.pl.in index 1e94a6fa..3714bc1f 100755 --- a/program/examples/minmax.pl.in +++ b/program/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/program/examples/shared-demo.pl.in b/program/examples/shared-demo.pl.in index 6d9374f6..f01c1ae1 100755 --- a/program/examples/shared-demo.pl.in +++ b/program/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/program/examples/stripes.pl.in b/program/examples/stripes.pl.in index 5187a56c..362f4992 100755 --- a/program/examples/stripes.pl.in +++ b/program/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.30.2