Bases: exceptions.RuntimeError
This class defines the exception that should be raised when a function, method, or class cannot detect an optional package that it depends on. When an OptionalPackageNotFoundError is raised, this means one of the following:
EXAMPLES:
sage: from sage.misc.exceptions import OptionalPackageNotFoundError
sage: def find_package(fav_package):
... try:
... raise OptionalPackageNotFoundError("Unable to detect optional package: %s" % fav_package)
... except OptionalPackageNotFoundError:
... raise
...
sage: find_package("ham and spam")
...
OptionalPackageNotFoundError: Unable to detect optional package: ham and spam