Add some more generic error messages

These are almost all taken from error messages that are specific to one
particular module, and turned into generic errors that can be used for any
module.  It seemed like a better idea to provide generic messages than to
encourage infinite proliferation of error codes (which would probably end up
blowing the 255 value threshold sooner or later).  It doesn't seem necessary
to provide module-specific error messages for things like "Invalid <X>
filesize", since users should already know what sort of file they're asking
to be parsed.
This commit is contained in:
Matt Palmer
2020-04-23 12:36:15 +10:00
parent c5d2d5396f
commit b25c8d9a5a
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -534,6 +534,10 @@ typedef enum parser_rc
PARSER_TOKEN_LENGTH = -35,
PARSER_INSUFFICIENT_ENTROPY = -36,
PARSER_PKZIP_CT_UNMATCHED = -37,
PARSER_KEY_SIZE = -38,
PARSER_BLOCK_SIZE = -39,
PARSER_CIPHER = -40,
PARSER_FILE_SIZE = -41,
PARSER_UNKNOWN_ERROR = -255
} parser_rc_t;