mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 22:21:01 +01:00
Add specific handling for DOMExceptions
This commit is contained in:
parent
65bb7f32e9
commit
cbf1d2feb0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user