Cannot reference postMessage id on error in web workers
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 13.7k
- Fork
- 1.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Start with the web worker postMessage call and the onerror handler shown in the issue, then inspect how success events expose event.data.id. Determine whether the worker error path can retain or expose the posted message id; done would be a documented or implemented way to correlate errors with messages.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- databases, web-dev
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100