Make web workers debuggable! This way an error can be caught in the browser when the web worker throws an error.
See http://www.nczonline.net/blog/2009/08/25/web-workers-errors-and-debugging/
This commit is contained in:
parent
e7ee11c86a
commit
c131715a2f
@ -20,6 +20,10 @@ function MessageHandler(name, comObj) {
|
||||
warn(data);
|
||||
}];
|
||||
|
||||
comObj.onerror = function(event){
|
||||
throw new Error(event.message + " (" + event.filename + ":" + event.lineno + ")");
|
||||
};
|
||||
|
||||
comObj.onmessage = function messageHandlerComObjOnMessage(event) {
|
||||
var data = event.data;
|
||||
if (data.isReply) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user