Jump to content

Error handling


max123
 Share

Recommended Posts

Is there a way to gracefully handle errors in BJS?
For example, I'm building a SPA, and when a user navigates to another screen too quickly (before the scene has finished loading), this very unsightly screen remains. It is impossible to get rid of without refresh, even though the rest of the SPA is still working fine. 

Or is there a way to stop loading the scene? 

Screen Shot 2016-08-19 at 16.05.40.png

Link to comment
Share on other sites

Hi @max123, good to see you again.  Sorry it has taken so long to get a response.

That is a screen produced by the Babylon AssetsManager.  It has some tools to shut-off the screen and be graceful.

You can find its docs here, and if you want to see its source code, check here.  I don't have much experience with it, but at least this gives you an onTaskError callback-function to do some tests-with.  Good luck, hope this helps.

Link to comment
Share on other sites

6 hours ago, Wingnut said:

Hi @max123, good to see you again.  Sorry it has taken so long to get a response.

That is a screen produced by the Babylon AssetsManager.  It has some tools to shut-off the screen and be graceful.

You can find its docs here, and if you want to see its source code, check here.  I don't have much experience with it, but at least this gives you an onTaskError callback-function to do some tests-with.  Good luck, hope this helps.

Thanks, Wingnut, I will give it a go.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...