On rare occasions, a Javascript object that isn't an error gets thrown.
This PR ensures that we are handling this situation without anything going
too far astray.

This is a followup to #2236.
Add handling and tests for weird Javascript errors. On rare occasions, a Javascript object that isn't an error gets thrown.
This PR ensures that we are handling this situation without anything going
too far astray.

This is a followup to #2236.
const API = Module.API;
const Hiwire = Module.hiwire;
const Tests = API.tests;

const API = Module.API;
const Hiwire = Module.hiwire;
const Tests = API.tests;
