scenario.errcodes module¶
Command line error codes.
Error codes returned by the ScenarioRunner
or CampaignRunner
programs.
- class ErrorCode¶
Bases:
IntEnum
Error codes enum.
Note
Codes inspired from HTTP status codes, but with error codes less than 256.
20-29: Normal errors.
40-49: Input related errors.
50-59: Processing and output related errors.
- SUCCESS = 0¶
Success.
- TEST_ERROR = 21¶
When a test failed.
- ENVIRONMENT_ERROR = 40¶
Errors due to the environnement.
- ARGUMENTS_ERROR = 41¶
Errors due to invalid arguments.
- INPUT_MISSING_ERROR = 42¶
Errors due to missing inputs.
- INPUT_FORMAT_ERROR = 43¶
Errors due to invalid input format.
- INTERNAL_ERROR = 50¶
Internal error.
- static worst(error_codes)¶
Returns the worst error code from the list.
The higher the error value, the worse.
- Parameters:
error_codes – List to find the worst error code from.
- Returns:
Worst error code.