summaryrefslogtreecommitdiff
path: root/src/examples/rrdJFlotTwo.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/rrdJFlotTwo.html')
-rw-r--r--src/examples/rrdJFlotTwo.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/examples/rrdJFlotTwo.html b/src/examples/rrdJFlotTwo.html
index 2aed031..4d1c79c 100644
--- a/src/examples/rrdJFlotTwo.html
+++ b/src/examples/rrdJFlotTwo.html
@@ -95,6 +95,10 @@
// and performs the update of the Web page
function update_fname_handler1(bf) {
var i_rrd_data=undefined;
+ if (bf.getLength()<1) {
+ alert("File "+fname1+" is empty (possibly loading failed)!");
+ return 1;
+ }
try {
var i_rrd_data=new RRDFile(bf);
} catch(err) {
@@ -108,6 +112,10 @@
function update_fname_handler2(bf) {
var i_rrd_data=undefined;
+ if (bf.getLength()<1) {
+ alert("File "+fname2+" is empty (possibly loading failed)!");
+ return 1;
+ }
try {
var i_rrd_data=new RRDFile(bf);
} catch(err) {