emscripten Humble Cloud interface
Edward Rudd
2014-10-14 2063f88c82d85aea23998bdf776683869396fdf1

handle exceptions inside the humble_fetch_asset_data

1 files modified
4 ■■■■ changed files
client/library/library_humble.js 4 ●●●● patch | view | raw | blame | history
client/library/library_humble.js
@@ -199,6 +199,7 @@
            Runtime.dynCall('viii', onload, [arg, buffer, byteArray.length]);
            _free(buffer);
        }, function(err) {
            try {
            var url = HUMBLE_API.locateAsset(path);
            Browser.asyncLoad(url, function(byteArray) {
                HUMBLE_API.storeToCache(cacheKey, byteArray, function(err) {
@@ -210,6 +211,9 @@
            }, function() {
                if (onerror) Runtime.dynCall('vi', onerror, [arg]);
            }, true /* NO run dependency */);
            } catch(ex) {
                if (onerror) Runtime.dynCall('vi', onerror, [arg]);
            }
        });
    },
    humble_get_player_size: function(w, h) {