AsyncConversion.Exception Property

Gets the exception that occurred during the conversion operation.

public Exception Exception { get; }
Public Property Exception As Exception

Property Value

Exception

Licensing Info

This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples

Example shows how to use Exception property of asyncConversion class.
Imports ceTe.DynamicPDF.Conversion
Module Module1

    Sub Main()

        ' create an instance of AsyncConverter
        Dim converter As AsyncConverter = New AsyncConverter

        ' Call Convert method to start conversion asynchronously and  Get the status of conversion
        Dim asyncConversion As AsyncConversion = converter.Convert("C:\MyDocument.doc", "C:\MyOutput.pdf")

        asyncConversion.Abort()

        While(True)
            If (asyncConversion.Completed Or asyncConversion.Exception IsNot Nothing) Then
                Console.WriteLine("Conversion completed or Exception occurred.")
                Exit While
            End IF
        End While
    End Sub

End Module
class MyClass
{
    static void Main()
    {
        // create an instance of AsyncConverter
        AsyncConverter converter = new AsyncConverter();

        // Call Convert method to start conversion asynchronously and  Get the status of conversion
        AsyncConversion asyncConversion = converter.Convert(@"C:\MyDocument.doc", @"C:\MyOutput.pdf");
        while (true)
        {

            if (asyncConversion.Exception != null || asyncConversion.Completed)
            {
                    Console.WriteLine("Conversion completed or exception occured");
                    break;
            }

        }
    }
}

See Also

AsyncConversion
ceTe.DynamicPDF.Conversion

In this topic