RemoteSystemWatcher.ErrorOccurred Event
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.
This event is raised when an error occurs during discovery. The discovery process will continue if possible. For example, if the error occurs with a value of RemoteSystemWatcherError.InternetNotAvailable (see RemoteSystemWatcherError), proximal discovery will continue because the error applies only to cloud discovery (see RemoteSystemDiscoveryType).
// Register
event_token ErrorOccurred(TypedEventHandler<RemoteSystemWatcher, RemoteSystemWatcherErrorOccurredEventArgs const&> const& handler) const;
// Revoke with event_token
void ErrorOccurred(event_token const* cookie) const;
// Revoke with event_revoker
RemoteSystemWatcher::ErrorOccurred_revoker ErrorOccurred(auto_revoke_t, TypedEventHandler<RemoteSystemWatcher, RemoteSystemWatcherErrorOccurredEventArgs const&> const& handler) const;
public event TypedEventHandler<RemoteSystemWatcher,RemoteSystemWatcherErrorOccurredEventArgs> ErrorOccurred;
function onErrorOccurred(eventArgs) { /* Your code */ }
remoteSystemWatcher.addEventListener("erroroccurred", onErrorOccurred);
remoteSystemWatcher.removeEventListener("erroroccurred", onErrorOccurred);
- or -
remoteSystemWatcher.onerroroccurred = onErrorOccurred;
Public Custom Event ErrorOccurred As TypedEventHandler(Of RemoteSystemWatcher, RemoteSystemWatcherErrorOccurredEventArgs)
Event Type
Windows requirements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v6.0)
|
Remarks
The listener for this event should notify the user of the type of error that was encountered. See the RemoteSystemWatcherError enum for details.