Share via


TransferTargetInvokeResult.ExtendedError Property

Definition

The ExtendedError property gets the exception that provides additional information about why the transfer operation failed. This property is useful for diagnosing issues during the invocation of a transfer target.

public:
 property HResult ExtendedError { HResult get(); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Windows.Foundation.Metadata.Experimental]
HResult ExtendedError();
[Windows.Foundation.Metadata.Experimental]
public System.Exception ExtendedError { [Windows.Foundation.Metadata.Experimental] get; }
var hResult = transferTargetInvokeResult.extendedError;
Public ReadOnly Property ExtendedError As Exception

Property Value

An Exception object that contains details about the error that occurred during the transfer operation.

Attributes

Examples

Example: Handling an Extended Error

if (!result.Succeeded)
{
    Console.WriteLine($"Transfer failed with error: {result.ExtendedError.Message}");
}

Remarks

The ExtendedError property is populated only when the transfer operation fails. Applications can use this property to log or display error details to the user.

Usage Notes:

  • Check the Succeeded property before accessing ExtendedError to ensure that the operation failed.
  • Use this property to provide meaningful error messages or take corrective actions.

Applies to

See also