Share via


IStylusSyncPlugin.Error Method

Notifies the implementing object that this plug-in or one of the previous ones in the StylusSyncPluginCollection collection threw an exception.

Namespace:  Microsoft.StylusInput
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Sub Error ( _
    sender As RealTimeStylus, _
    data As ErrorData _
)
'Usage
Dim instance As IStylusSyncPlugin 
Dim sender As RealTimeStylus 
Dim data As ErrorData

instance.Error(sender, data)
void Error(
    RealTimeStylus sender,
    ErrorData data
)
void Error(
    RealTimeStylus^ sender, 
    ErrorData^ data
)
function Error(
    sender : RealTimeStylus, 
    data : ErrorData
)

Parameters

Remarks

Note

Error is a keyword in Microsoft Visual Basic .NET. When implementing an Error method in Visual Basic .NET, you must enclose the word "Error" in square brackets, as shown in the following example.

Public Sub [Error](ByVal sender As Microsoft.StylusInput.RealTimeStylus, _
                   ByVal data As Microsoft.StylusInput.PluginData.ErrorData) _
    Implements Microsoft.StylusInput.IStylusSyncPlugin.Error

Examples

This C# example is excerpted from the RealTimeStylus Plug-in Sample. The example alerts the developer to any error that is received, displaying the DataId and InnerException properties.

public void Error(RealTimeStylus sender, ErrorData data)
{
  Debug.Assert(false, "Error", "An error occurred.  DataId=" + data.DataId + ", " + "Exception=" + data.InnerException);
}

This Microsoft Visual Basic .NET example is excerpted from the RealTimeStylus Plug-in Sample. The example alerts the developer to any error that is received, displaying the DataId and InnerException properties.

Public Sub [Error](ByVal sender As RealTimeStylus, ByVal data As ErrorData) _
  Implements IStylusSyncPlugin.Error
      Debug.Assert(False, "Error", "An error occurred.  DataId=" & _
                         data.DataId.ToString() & ", Exception=" & _
                         data.InnerException.ToString())
End Sub 'Error

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

IStylusSyncPlugin Interface

IStylusSyncPlugin Members

Microsoft.StylusInput Namespace

Other Resources

Error Handling Considerations for the StylusInput APIs