Forum

Detect WEbGL error in appliction

07 August 2017 12:16
Hi,

Basically, I want to detect when there was error on blend4web webgl rendering, and "reload the page automatically".
I could not find a api that monitors error status.
Could you please give me a help?

Regards,
Justin
07 August 2017 23:41
Many errors would not be fixed by reloading the page. If you did that, it could start a never-ending loop.
You could change the init_cb() function to load a separate error page that gives the user an option to try reloading the original page.

function init_cb(canvas_elem, success) {
    if (!success) {
        console.log("b4w init failure");
        //load error page
        window.location.replace('http://error_page.com');
        return;
    }
 
Please register or log in to leave a reply.