mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Added 'DishError' and refined test results.
This commit is contained in:
parent
d2325306db
commit
b29bb6fdd7
7 changed files with 117 additions and 77 deletions
|
@ -4,10 +4,10 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
// import Operation from "./Operation.js";
|
||||
import OpModules from "./config/modules/OpModules";
|
||||
import OperationConfig from "./config/OperationConfig.json";
|
||||
import OperationError from "./errors/OperationError";
|
||||
import DishError from "./errors/DishError";
|
||||
import log from "loglevel";
|
||||
|
||||
/**
|
||||
|
@ -183,6 +183,10 @@ class Recipe {
|
|||
// native types is not fully supported yet.
|
||||
dish.set(err.message, "string");
|
||||
return i;
|
||||
} else if (err instanceof DishError ||
|
||||
(err.type && err.type === "DishError")) {
|
||||
dish.set(err.message, "string");
|
||||
return i;
|
||||
} else {
|
||||
const e = typeof err == "string" ? { message: err } : err;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue