simon_bg Posted April 7, 2016 Share Posted April 7, 2016 Hey fellas, I've found an issue where some errors do not appear in the javascript console. For example, in this playground http://www.babylonjs-playground.com/#IXKRE , I put "BAYLON" instead of "BABYLON" on the line 16, and there is no error in the console. But when I put the same code outside the ImportMesh callback, it does throw an error. It hasn't always been like this, though. I could narrow down the problem to this exact commit, where the issue was generated:https://github.com/BabylonJS/Babylon.js/commit/b23fe21009073e2790d2a5be0bf03b3aa13b92e4#diff-207980660c3ac28d763f8c488a44f7c4 Could somebody fix this issue, please? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
RaananW Posted April 7, 2016 Share Posted April 7, 2016 This is not a bug. This is the expected behavior. you can register an onerror function to catch errors during mesh import, like this> http://www.babylonjs-playground.com/#IXKRE#1 . Wait a few seconds, let the mesh load, and you will see the error simon_bg 1 Quote Link to comment Share on other sites More sharing options...
simon_bg Posted April 7, 2016 Author Share Posted April 7, 2016 Oh ok, thanks! Quote Link to comment Share on other sites More sharing options...
simon_bg Posted April 7, 2016 Author Share Posted April 7, 2016 It's could be somewhat uncomfortable though when you have several lines of code in the ImportMesh callback, because the exact error line is not indicated. Quote Link to comment Share on other sites More sharing options...
RaananW Posted April 7, 2016 Share Posted April 7, 2016 We could provide you with the exception and not a generic error message. then you could retrieve the stack. I guess this makes sense. I will implement the change, shouldn't be a problem. Quote Link to comment Share on other sites More sharing options...
simon_bg Posted April 7, 2016 Author Share Posted April 7, 2016 Yes, I think that would be better. Thanks! Quote Link to comment Share on other sites More sharing options...
RaananW Posted April 7, 2016 Share Posted April 7, 2016 Submitted, soon to be reviewed. https://github.com/BabylonJS/Babylon.js/pull/1088 simon_bg 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.