{"action":"opened","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/6141","repository_url":"https://api.github.com/repos/openlayers/ol3","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/6141/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/6141/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/6141/events","html_url":"https://github.com/openlayers/ol3/issues/6141","id":190032668,"number":6141,"title":"Handling WMS exceptions in openlayers3","user":{"login":"mfarook","id":8999372,"avatar_url":"https://avatars.githubusercontent.com/u/8999372?v=3","gravatar_id":"","url":"https://api.github.com/users/mfarook","html_url":"https://github.com/mfarook","followers_url":"https://api.github.com/users/mfarook/followers","following_url":"https://api.github.com/users/mfarook/following{/other_user}","gists_url":"https://api.github.com/users/mfarook/gists{/gist_id}","starred_url":"https://api.github.com/users/mfarook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfarook/subscriptions","organizations_url":"https://api.github.com/users/mfarook/orgs","repos_url":"https://api.github.com/users/mfarook/repos","events_url":"https://api.github.com/users/mfarook/events{/privacy}","received_events_url":"https://api.github.com/users/mfarook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-17T12:24:27Z","updated_at":"2016-11-17T12:24:27Z","closed_at":null,"body":"I am loading a wms service reading from json.The WMS gets added successfully. I have no idea how to handle exceptions if there is any WMS request failure.I am new to openlayers.This is my function where am adding WMS.\r\n\r\nfunction (node) {\r\n                if (!('name' in node)) {\r\n                    return null;\r\n                }\r\n                var type = node['name'];\r\n                if (type in layerCache) {\r\n                    return layerCache[type];\r\n                }\r\n                var source;\r\n                source = new ol.source.TileWMS({\r\n                    url: node['source']['url'],\r\n                    params: node['source']['params']\r\n                });\r\n                source.on('tileloadstart', function() {\r\n                    progress.addLoading();\r\n                });\r\n\r\n                source.on('tileloadend', function() {\r\n                    progress.addLoaded();\r\n                });\r\n                source.on('tileloaderror', function() {\r\n                    progress.addLoaded();\r\n                });\r\n                var layer = new ol.layer.Tile({\r\n                    source: source\r\n                });\r\n                layerCache[type] = layer;\r\n                return layer;\r\n\r\n            }"}}
{"actor":{"display_login":"mfarook"}}