Renamed exception.
This commit is contained in:
parent
9a19fdd134
commit
2af4ba861c
2 changed files with 10 additions and 9 deletions
|
|
@ -6,7 +6,7 @@ from .__about__ import __version__
|
|||
from ._markitdown import MarkItDown
|
||||
from ._exceptions import (
|
||||
MarkItDownException,
|
||||
ConverterPrerequisiteException,
|
||||
MissingOptionalDependencyException,
|
||||
FileConversionException,
|
||||
UnsupportedFormatException,
|
||||
)
|
||||
|
|
@ -18,7 +18,7 @@ __all__ = [
|
|||
"DocumentConverter",
|
||||
"DocumentConverterResult",
|
||||
"MarkItDownException",
|
||||
"ConverterPrerequisiteException",
|
||||
"MissingOptionalDependencyException",
|
||||
"FileConversionException",
|
||||
"UnsupportedFormatException",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@ class MarkItDownException(BaseException):
|
|||
pass
|
||||
|
||||
|
||||
class ConverterPrerequisiteException(MarkItDownException):
|
||||
class MissingOptionalDependencyException(MarkItDownException):
|
||||
"""
|
||||
Thrown when instantiating a DocumentConverter in cases where
|
||||
a required library or dependency is not installed, an API key
|
||||
is not set, or some other prerequisite is not met.
|
||||
Converters shipped with MarkItDown may depend on optional
|
||||
dependencies. This exception is thrown when a converter's
|
||||
convert() method is called, but the required dependency is not
|
||||
installed. This is not necessarily a fatal error, as the converter
|
||||
will simply be skipped (an error will bubble up only if no other
|
||||
suitable converter is found).
|
||||
|
||||
This is not necessarily a fatal error. If thrown during
|
||||
MarkItDown's plugin loading phase, the converter will simply be
|
||||
skipped, and a warning will be issued.
|
||||
Error messages should clearly indicate which dependency is missing.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue