[ the jinxbot project :: home | community forum | bn# | controls | mbncsutil | get the source ]

[This is preliminary documentation and is subject to change.]

Contains information about when a BN# connection event handler callback raises an exception.

Namespace:  BNSharp
Assembly:  BNSharp (in BNSharp.dll) Version: 0.8.8.15 (0.08.08.15)

Syntax

C#
public class EventExceptionEventArgs : EventArgs
Visual Basic (Declaration)
Public Class EventExceptionEventArgs _
	Inherits EventArgs
Visual C++
public ref class EventExceptionEventArgs : public EventArgs

Remarks

Battle.net-related events driven by BattleNetClient are guaranteed to execute sequentially, in the order in which they were registered relative to other event handlers of their priority.

Examples

For example, consider a scenario in which there are three handlers registered for the UserJoined event; one is registered at High Priority and two are registered at Low priority:

  • High: Moderation.ChannelModerationHandler.client_UserJoined(System.Object, BNSharp.UserEventArgs)
  • Low: Client.UI.ChatDisplay.client_UserJoined(System.Object, BNSharp.UserEventArgs)
  • Low: Client.UI.ChannelDisplay.client_UserJoined(System.Object, BNSharp.UserEventArgs)

Unlike normal .NET event handlers, every one of those handlers are guaranteed to be called back, regardless of whether a prior handler caused an exception to be thrown. However, if an exception is thrown, the EventExceptionThrown event will be raised on the client. So, the sequence of external method calls that would happen in such an event, if the Moderation handler threw an exception, would be something along these lines:

  • ChannelModerationHandler.client_UserJoined (raises exception)
  • BattleNetClient.EventExceptionThrown
  • ChatDisplay.client_UserJoined
  • ChannelDisplay.client_UserJoined

Typically, all listeners of the EventExceptionThrown event are not guaranteed to be called and follow normal .NET event semantics.

Inheritance Hierarchy

System..::.Object
  System..::.EventArgs
    BNSharp..::.EventExceptionEventArgs

See Also