TransferTargetInvokeResult.ExtendedError Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Succeededproperty before accessingExtendedErrorto ensure that the operation failed. - Use this property to provide meaningful error messages or take corrective actions.