summaryrefslogtreecommitdiff
path: root/src/examples/rrdJFlot.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/rrdJFlot.html')
-rw-r--r--src/examples/rrdJFlot.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/examples/rrdJFlot.html b/src/examples/rrdJFlot.html
index 9c24f59..b5fb4a5 100644
--- a/src/examples/rrdJFlot.html
+++ b/src/examples/rrdJFlot.html
@@ -87,10 +87,15 @@
// and performs the update of the Web page
function update_fname_handler(bf) {
var i_rrd_data=undefined;
+ if (bf.getLength()<1) {
+ alert("File "+fname+" is empty (possibly loading failed)!");
+ return 1;
+ }
try {
var i_rrd_data=new RRDFile(bf);
} catch(err) {
alert("File "+fname+" is not a valid RRD archive!\n"+err);
+ return 1;
}
if (i_rrd_data!=undefined) {
rrd_data=i_rrd_data;