1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Merge pull request #185 from montaggroup/propagate-gettext-error

Propagate gettext error
This commit is contained in:
Fred Chasen 2015-01-12 10:40:30 -05:00
commit 2b27889de2
2 changed files with 11 additions and 3 deletions

View file

@ -75,6 +75,9 @@ EPUBJS.replace.links = function(_store, full, done, link){
setTimeout(function(){
done(url, full);
}, 5); //-- Allow for css to apply before displaying chapter
}, function(reason) {
// we were unable to replace the style sheets
done(null);
});
}else{
_store.getUrl(full).then(done, function(reason) {
@ -100,10 +103,12 @@ EPUBJS.replace.stylesheets = function(_store, full) {
deferred.resolve(url);
}, function(e) {
console.error(e);
}, function(reason) {
deferred.reject(reason);
});
}, function(reason) {
deferred.reject(reason);
});
return deferred.promise;

View file

@ -68,7 +68,10 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){
var _URL = window.URL || window.webkitURL || window.mozURL;
if(!entry) {
console.warn("File not found in the contained epub:", url);
deferred.reject({
message : "File not found in the epub: " + url,
stack : new Error().stack
});
return deferred.promise;
}