See Also

Agent Class  | Agent Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages PowerSNMP for .NET

Exception Event

Dart.PowerSNMP Namespace > Agent Class : Exception Event (Agent)

Occurs when an unexpected error or exception is found while processing data on the IO completion threat.

[Visual Basic]
<CategoryAttribute("Exception")> <DescriptionAttribute("Raised when a failure condition occurs.")> Public Event Exception() As ExceptionEventHandler
[C#]
[CategoryAttribute("Exception")] [DescriptionAttribute("Raised when a failure condition occurs.")] public event ExceptionEventHandler Exception();
[C++]
[CategoryAttribute("Exception")] [DescriptionAttribute("Raised when a failure condition occurs.")] public: __event ExceptionEventHandler* Exception();
[C++/CLI]
[CategoryAttribute("Exception")] [DescriptionAttribute("Raised when a failure condition occurs.")] public: event ExceptionEventHandler^ Exception();

Event Data

The event handler receives an argument of type ExceptionEventArgs containing data related to this event. The following ExceptionEventArgs properties provide information specific to this event.

PropertyDescription
Exception Gets the Exception raised while processing a SNMP message.

Remarks

Exceptions may be raised while reading a network socket, failing to decode or decrypt an incoming SNMP packet, or some other software error. This event is raised to indicate a failure condition during asynchronous operations. Events encountered during synchronous operations are thrown for the application to catch in a try/catch block.

Example

The following example demonstrates the Exception event handler.

[Visual Basic] 


Private Sub Agent1_Exception(ByVal sender As Object, ByVal e As Dart.PowerSNMP.ExceptionEventArgs) Handles Agent1.Exception
    'add exception to a listbox
    listBox1.Items.Add(e)
End Sub

[C#] 


private void component_Exception(Dart.PowerSNMP.ExceptionEventArgs e)
{
   
// add exception to a listbox
   
listBox1.Items.Add(e);
}

                

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

See Also

Agent Class  | Agent Members


Send comments on this topic.

Documentation version 1.2.0.0.

© 2008 Dart Communications.  All rights reserved.