Closed asadm closed 4 months ago
What should I do here, catch the errors on JS side and send to unity?
What should I do here, catch the errors on JS side and send to unity?
That sounds reasonable. Essentially it might be cool to differentiate between a Unity error and a JavaScript error. So an interesting idea would be to throw an Error in C# with
{
"type": "UNCAUGHT_JAVASCRIPT_EXCEPTION",
"message": "Uncaught exception in JavaScript library",
"error": "<dump everything here/>"
}
Shifted to #40 for further discussion, as the OP's Issue has been solved.
I noticed that if Unity calls some native javascript code, and that throws an error, the error doesn't propagate automatically in my C# code, so I can't wrap my own code in some try catch. How do you guys deal with this situation?