2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-14 15:23:20 +00:00

Add specific handling for DOMExceptions

This commit is contained in:
j433866
2019-05-08 16:42:06 +01:00
parent 65bb7f32e9
commit cbf1d2feb0

View File

@@ -112,6 +112,16 @@ async function bake(data) {
})
});
} catch (err) {
if (err instanceof DOMException) {
self.postMessage({
action: "bakeError",
data: {
error: err.message,
id: data.id,
inputNum: data.inputNum
}
});
} else {
self.postMessage({
action: "bakeError",
data: {
@@ -121,6 +131,7 @@ async function bake(data) {
}
});
}
}
self.inputNum = -1;
}