BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
813 stars 232 forks source link

Print Error message when plugin cannot be imported #369

Closed prestomation closed 2 years ago

prestomation commented 2 years ago

When adding a plugin and require() throws, this error is swallowed. There is no good way for the plugin developer to know what happened.

This change adds a single console.error() when this happens to print this exception, which provides at least something for the plugin developer to use to figure out what is going wrong. A better mitigation would be to add an error popup, but I'm not familiar enough with the editor UI to know the best way to do this. I'm opening this PR to start the conversation on this gap.

julien-moreau commented 2 years ago

Thanks @prestomation this is what we needed as developers to help debugging

in future we’ll add some alerts