{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/7801","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/7801/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/7801/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/7801/events","html_url":"https://github.com/mrdoob/three.js/pull/7801","id":122478114,"number":7801,"title":"LoadingManager: add a mechanism to allow non-fatal loading errors","user":{"login":"kkananen","id":1742765,"avatar_url":"https://avatars.githubusercontent.com/u/1742765?v=3","gravatar_id":"","url":"https://api.github.com/users/kkananen","html_url":"https://github.com/kkananen","followers_url":"https://api.github.com/users/kkananen/followers","following_url":"https://api.github.com/users/kkananen/following{/other_user}","gists_url":"https://api.github.com/users/kkananen/gists{/gist_id}","starred_url":"https://api.github.com/users/kkananen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkananen/subscriptions","organizations_url":"https://api.github.com/users/kkananen/orgs","repos_url":"https://api.github.com/users/kkananen/repos","events_url":"https://api.github.com/users/kkananen/events{/privacy}","received_events_url":"https://api.github.com/users/kkananen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-16T10:59:05Z","updated_at":"2015-12-17T20:29:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/7801","html_url":"https://github.com/mrdoob/three.js/pull/7801","diff_url":"https://github.com/mrdoob/three.js/pull/7801.diff","patch_url":"https://github.com/mrdoob/three.js/pull/7801.patch"},"body":"Currently, if THREE.ObjectLoader fails to load a single texture, neither success or failure is reported back to the caller. This change adds a mechanism to report errors and to allow onLoad() still be called when done with all items, even if there are errors, if the errors are non-fatal."},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/165573786","html_url":"https://github.com/mrdoob/three.js/pull/7801#issuecomment-165573786","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/7801","id":165573786,"user":{"login":"kkananen","id":1742765,"avatar_url":"https://avatars.githubusercontent.com/u/1742765?v=3","gravatar_id":"","url":"https://api.github.com/users/kkananen","html_url":"https://github.com/kkananen","followers_url":"https://api.github.com/users/kkananen/followers","following_url":"https://api.github.com/users/kkananen/following{/other_user}","gists_url":"https://api.github.com/users/kkananen/gists{/gist_id}","starred_url":"https://api.github.com/users/kkananen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkananen/subscriptions","organizations_url":"https://api.github.com/users/kkananen/orgs","repos_url":"https://api.github.com/users/kkananen/repos","events_url":"https://api.github.com/users/kkananen/events{/privacy}","received_events_url":"https://api.github.com/users/kkananen/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T20:29:02Z","updated_at":"2015-12-17T20:29:02Z","body":"Yes you are correct - the downside would be that any LoadingManager instance with an onLoad callback set (that would not accept failures) would individually need to keep track whether an error occurred, e.g. Menubar.File.js:228.\r\n\r\n(Menubar.File.js is actually the only other place in THREE.js codebase setting LoadingManager.onLoad so modifying this wouldn't be too much of a pain)\r\n\r\nA quick search through github shows instances of three.js users setting LoadingManager.onLoad (couldn't find a way to get proper stats from github though) so some people would need to modify their code to prevent onLoad from being called after errors.\r\n\r\ne.g. current code doing this:\r\n```\r\nvar manager = new THREE.LoadingManager(function() {/* code to handle success here */})\r\n```\r\n\r\nwould need to do something like this:\r\n\r\n```\r\nvar somethingFailed = false;\r\nvar manager = new THREE.LoadingManager(\r\n    function() {\r\n        if (!somethingFailed) {\r\n            /* code to handle success here */\r\n        }\r\n    }, undefined,\r\n    function() {\r\n        somethingFailed = true;\r\n    })\r\n```\r\n"}}