allegro / allegro/node-worker-nodes

fail not catched when error is unserializable

Aperta
#49 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
494
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,
i happen to call browserify in a worker node: upon failure it returns an error with a lot of additional structures.
It took me a while to realize I had to rewrite the error using:
```
const err2 = new Error(err.message);
err2.code = err.code;
err2.stack = err.stack;
reject(err2);
```
i wonder if there is a way for worker-nodes to avoid the headache.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.