summaryrefslogtreecommitdiff
path: root/src/examples/rrdHeaderInfo.html
diff options
context:
space:
mode:
authorIgor Sfiligoi <isfiligoi@ucsd.edu>2013-03-23 16:12:34 +0000
committerIgor Sfiligoi <isfiligoi@ucsd.edu>2013-03-23 16:12:34 +0000
commit82592941fbb012a0581e63f3c22ceb5ae38a1026 (patch)
treecae3048261aefa669e0e4e198477838b41701f99 /src/examples/rrdHeaderInfo.html
parentccde18044f9a13d91d367550d72b61a03e32129a (diff)
Better support for error in Chrome
Diffstat (limited to 'src/examples/rrdHeaderInfo.html')
-rw-r--r--src/examples/rrdHeaderInfo.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/examples/rrdHeaderInfo.html b/src/examples/rrdHeaderInfo.html
index 3a772d7..c0feddb 100644
--- a/src/examples/rrdHeaderInfo.html
+++ b/src/examples/rrdHeaderInfo.html
@@ -102,6 +102,10 @@
// and performs the update of the Web page
function update_info_handler(bf) {
var rrd_data=undefined;
+ if (bf.getLength()<1) {
+ alert("File "+fname+" is empty (possibly loading failed)!");
+ return 1;
+ }
try {
var rrd_data=new RRDFile(bf);
} catch(err) {