mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -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
26
src/core/errors/DishError.mjs
Normal file
26
src/core/errors/DishError.mjs
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* Custom error type for handling Dish type errors.
|
||||
* i.e. where the Dish cannot be successfully translated between types
|
||||
*
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
class DishError extends Error {
|
||||
/**
|
||||
* Standard error constructor. Adds no new behaviour.
|
||||
*
|
||||
* @param args - Standard error args
|
||||
*/
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.type = "DishError";
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, DishError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default DishError;
|
Loading…
Add table
Add a link
Reference in a new issue