ExceptionRoutedEventArgs.ErrorException Property


Gets the exception that caused the error condition.

 property Exception ^ ErrorException { Exception ^ get(); };
public Exception ErrorException { get; }
member this.ErrorException : Exception
Public ReadOnly Property ErrorException As Exception

Property Value

The exception that details the specific error condition.


The attempt to access the media file is denied.

The media file is not found.

The media file format is not supported by any installed codec.


The file format is not recognized.

Windows Media Player version 10 or later is not detected.


Video resources are insufficient for media playback.

A COM error code appears.


The following example creates a simple event handler for ExceptionRoutedEventArgs.

private void Media_MediaFailed(object sender, ExceptionRoutedEventArgs args)
Private Sub Media_MediaFailed(ByVal sender As Object, ByVal args As ExceptionRoutedEventArgs)
    If (True) Then
    End If
End Sub

Applies to