kieler / klayjs-d3

Bridge for KLayJS and D3.js
Eclipse Public License 1.0
61 stars 8 forks source link

Webworker does not handle errors #4

Open EyMaddis opened 8 years ago

EyMaddis commented 8 years ago

Hi, when I create edges to nodes that do not exist, the webworker version does not handle errors at all. I debugged a bit and noticed that the worker sends errors via the regular message channel which means that data in this event is the error object. See the following line: https://github.com/OpenKieler/klayjs-d3/blob/master/src/js/klay-d3.js#L64

It would be better if this would actually send the error via an error listener (worker.onerror)

uruuru commented 8 years ago

Sounds reasonable, I'll consider it as soon as I find time.