Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Cannot reference postMessage id on error in web workers

Aperta
#231 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
databases, web-dev

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.

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?

Lingua principale
JavaScript
Stelle
13.7k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sql-js/sql.js

Tutte le issue di sql-js/sql.js

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.