mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
Add specific handling for DOMExceptions
This commit is contained in:
parent
65bb7f32e9
commit
cbf1d2feb0
1 changed files with 19 additions and 8 deletions
|
@ -112,14 +112,25 @@ async function bake(data) {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
self.postMessage({
|
if (err instanceof DOMException) {
|
||||||
action: "bakeError",
|
self.postMessage({
|
||||||
data: {
|
action: "bakeError",
|
||||||
error: err,
|
data: {
|
||||||
id: data.id,
|
error: err.message,
|
||||||
inputNum: data.inputNum
|
id: data.id,
|
||||||
}
|
inputNum: data.inputNum
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
self.postMessage({
|
||||||
|
action: "bakeError",
|
||||||
|
data: {
|
||||||
|
error: err,
|
||||||
|
id: data.id,
|
||||||
|
inputNum: data.inputNum
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.inputNum = -1;
|
self.inputNum = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue