sql.js
sql.js copied to clipboard
Cannot reference postMessage id on error in web workers
Perhaps I am just missing it, but there doesn't seem to be a way to trace an error back to the message posted in web workers. For example, if:
this.webWorkerCatalogSQLiteDB.postMessage({ id: id, action: 'exec', sql: queryStr });
Results in an error, this gets handled in
this.webWorkerCatalogSQLiteDB.onerror = (error)=> { //TODO };
However, the error object returned doesn't seem to have any reference to the id of the message posted, unlike the success message, which has an event.data.id that references back.
Any advice?