asv_runner.benchmarks._exceptions#
Module Contents#
API#
- exception asv_runner.benchmarks._exceptions.NotRequired(message)#
Bases:
ImportErrorException raised when a requirement is not met.
This exception inherits from
ImportError. It’s typically used when a particular package, module or other dependency that is not essential for the overall function of the program is not found or doesn’t meet specific requirements.Attributes
- message (
str) A string that provides a more detailed explanation of the error.
Example
This exception might be used in a scenario where an optional feature of a program relies on a specific package that is not installed:
try: import optional_package except ImportError: raise NotRequired("optional_package is not installed.")
Initialization
Initialize a new instance of
NotRequired.Parameters
- message (
str) A string that provides a more detailed explanation of the error.
- message (