From 9d907d5bb079d2b03dea2223abc5a21b4f07cc48 Mon Sep 17 00:00:00 2001 From: Adam Brin Date: Tue, 22 Oct 2019 06:14:45 -0700 Subject: [PATCH] add catch statements --- leaflet-iiif.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/leaflet-iiif.js b/leaflet-iiif.js index cb811e8..7523b2d 100644 --- a/leaflet-iiif.js +++ b/leaflet-iiif.js @@ -114,6 +114,9 @@ L.TileLayer.Iiif = L.TileLayer.extend({ tile.tile.style.height = height + 'px'; }); + }) + .catch(function(err){ + console.error(err); }); }, onRemove: function(map) { @@ -163,6 +166,9 @@ L.TileLayer.Iiif = L.TileLayer.extend({ .then(function(response) { return response.json(); }) + .catch(function(err){ + console.error(err); + }) .then(function(data) { _this.y = data.height; _this.x = data.width; @@ -226,7 +232,11 @@ L.TileLayer.Iiif = L.TileLayer.extend({ _this._tierSizes = tierSizes; _this._imageSizes = imageSizes; + }) + .catch(function(err){ + console.error(err); }); + }, _setQuality: function() {