ConversionCompletedEventArgs.FailException Property
Gets the exception that occurred during the conversion operation.
public Exception FailException { get; }
Public ReadOnly Property FailException As Exception
Property Value
Licensing Info
This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use FailException property.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim rtfConversion As RtfConverter = New RtfConverter("C:\MyDocument.rtf")
' Events to know if conversion completed successfully or not
AddHandler rtfConversion.Completed, AddressOf converter_Converted
' Call Convert method to start conversion
rtfConversion.Convert("C:\MyOutput.pdf")
End Sub
Sub converter_Converted(ByVal sender As Object, ByVal e As ConversionCompletedEventArgs)
If (e.FailException IsNot Nothing) Then
Console.WriteLine("Conversion failed with:" + e.FailException.Message +" Exception")
End If
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
RtfConverter rtfConverter = new RtfConverter(@"C:\MyDocument.rtf");
//Events to know if conversion completed successfully or not
rtfConverter.Completed += new ConversionCompleted(completed);
//Call Convert method to start conversion
rtfConverter.Convert(@"C:\MyOutput.pdf");
}
public static void completed(object sender, ConversionCompletedEventArgs e)
{
if (e.FailException != null)
{
Console.WriteLine("Conversion failed with:" + e.FailException.Message + " Exception");
}
}
}