Error occurred while translating document. :param message: Message describing the error that occurred. :param document_handle: The document handle of the associated document.
| 66 | |
| 67 | |
| 68 | class DocumentTranslationException(DeepLException): |
| 69 | """Error occurred while translating document. |
| 70 | |
| 71 | :param message: Message describing the error that occurred. |
| 72 | :param document_handle: The document handle of the associated document. |
| 73 | """ |
| 74 | |
| 75 | def __init__(self, message: str, document_handle: DocumentHandle): |
| 76 | super().__init__(message) |
| 77 | self.document_handle = document_handle |
| 78 | |
| 79 | def __str__(self): |
| 80 | return f"{super().__str__()}, document handle: {self.document_handle}" |
| 81 | |
| 82 | @property |
| 83 | def document_request(self): |
| 84 | """Deprecated, use document_handle instead.""" |
| 85 | import warnings |
| 86 | |
| 87 | warnings.warn( |
| 88 | "document_request is deprecated", DeprecationWarning, stacklevel=2 |
| 89 | ) |
| 90 | return self.document_handle |
| 91 | |
| 92 | |
| 93 | class GlossaryNotFoundException(DeepLException): |
no outgoing calls
no test coverage detected