Improve error handling in worker
This commit is contained in:
parent
d71e9e4821
commit
36cb4defe2
@ -31,7 +31,7 @@ for f in eos.js_tests; do
|
||||
perl -0777 -pi -e 's/__except0__.__cause__ = null;//g' eos/__javascript__/$f.js
|
||||
|
||||
# Fix handling of properties, Transcrypt bug #407
|
||||
perl -077 -pi -e 's/var __get__ = function \(self, func, quotedFuncName\) \{/var __get__ = function (self, func, quotedFuncName) { if(typeof(func) != "function"){return func;}/g' eos/__javascript__/$f.js
|
||||
perl -0777 -pi -e 's/var __get__ = function \(self, func, quotedFuncName\) \{/var __get__ = function (self, func, quotedFuncName) { if(typeof(func) != "function"){return func;}/g' eos/__javascript__/$f.js
|
||||
perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__impl__(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js
|
||||
perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__implpy_(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js
|
||||
done
|
||||
|
@ -34,6 +34,7 @@ function generateEncryptedVote(election, answers, should_do_fingerprint) {
|
||||
}
|
||||
|
||||
onmessage = function(msg) {
|
||||
try {
|
||||
if (!isLibrariesLoaded) {
|
||||
importScripts(
|
||||
msg.data.static_base_url + "js/eosjs.js"
|
||||
@ -48,4 +49,10 @@ onmessage = function(msg) {
|
||||
} else {
|
||||
throw "Unknown action: " + msg.data.action;
|
||||
}
|
||||
} catch (ex) {
|
||||
if (ex.__repr__) {
|
||||
throw ex.__repr__();
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user