on_conversion_failed method

on_conversion_failed

Registers a callback to be invoked when a document conversion fails.

def on_conversion_failed(self, on_failed):
    ...
Parameter Type Description
on_failed Action[ConvertedContext, Exception] Callable[[ConversionContext, Exception], Any] – Action to handle the failure, receiving the conversion context and the exception that caused the failure.

Returns: IConversionHandlerOnly: Interface to continue conversion building, allowing only OnConversionCompleted or Convert/Compress.

See Also