diff options
author | Andrew Dolgov <[email protected]> | 2018-02-20 19:39:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-02-20 19:39:34 +0300 |
commit | b2a1b230132100adf754f53ca900c3574c804cdb (patch) | |
tree | bbf102deaffb0305d76f8d751c8ac3cce1580dfd | |
parent | de703d45c1865f1238d48eaaf1770772b9c93615 (diff) |
improve local error reporting a bit
-rw-r--r-- | read.html | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -297,7 +297,12 @@ var fileReader = new FileReader(); fileReader.onload = function(evt) { - book.open(this.result); + try { + book.open(this.result); + } catch (e) { + $(".loading_message").html("Unable to load book (local)."); + console.log(e); + } }; fileReader.readAsArrayBuffer(item); @@ -311,7 +316,7 @@ RSVP.on('error', function(error) { if ($(".loading").is(":visible")) { - $(".loading_message").html("Unable to load book."); + $(".loading_message").html("Unable to load book (remote)."); } console.log(error); }); |