rapier.js icon indicating copy to clipboard operation
rapier.js copied to clipboard

Exception thrown in drainCollisionEvents callback is silenced

Open roman01la opened this issue 2 years ago • 1 comments

This gave me hard time figuring out what's wrong with my code.

This won't propagate the error to browser context

eventQueue.drainCollisionEvents((handle1, handle2, started) => {
    throw "HELLO";
});

Current workaround

eventQueue.drainCollisionEvents((handle1, handle2, started) => {
   try {
         throw "HELLO";
    } catch (e) {
        console.error(e);
    }
});

Thanks for building rapier!

roman01la avatar Nov 02 '22 13:11 roman01la