mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
Changed all error returns to OperationErrors
This commit is contained in:
parent
b3ee251ee3
commit
2e4f5b7070
25 changed files with 88 additions and 35 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
import Operation from "../Operation";
|
||||
import OperationError from "../errors/OperationError";
|
||||
|
||||
/**
|
||||
* Parse UNIX file permissions operation
|
||||
|
@ -169,7 +170,7 @@ class ParseUNIXFilePermissions extends Operation {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
return "Invalid input format.\nPlease enter the permissions in either octal (e.g. 755) or textual (e.g. drwxr-xr-x) format.";
|
||||
throw new OperationError("Invalid input format.\nPlease enter the permissions in either octal (e.g. 755) or textual (e.g. drwxr-xr-x) format.");
|
||||
}
|
||||
|
||||
output += "Textual representation: " + permsToStr(perms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue