From 82592941fbb012a0581e63f3c22ceb5ae38a1026 Mon Sep 17 00:00:00 2001 From: Igor Sfiligoi Date: Sat, 23 Mar 2013 16:12:34 +0000 Subject: Better support for error in Chrome --- src/examples/rrdJFlotFilter.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/examples/rrdJFlotFilter.html') diff --git a/src/examples/rrdJFlotFilter.html b/src/examples/rrdJFlotFilter.html index c588e90..1fee276 100644 --- a/src/examples/rrdJFlotFilter.html +++ b/src/examples/rrdJFlotFilter.html @@ -127,6 +127,10 @@ // 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) { -- cgit v1.2.3-2-g168b