The exception event handler
The event handler receives an argument of type EMSExceptionEventArgs containing data related to this event. The following EMSExceptionEventArgs property provides information specific to this event.
Property | Description |
---|---|
Exception | Get the EMSException which caused the event |
Delegate declaration for exception handler is as follows:
public delegate void EMSExceptionHandler(object sender, EMSExceptionEventArgs args);
sender: The source of the event, the connection in this case.
args: The event argument, EMSExceptionEventArgs
... connection.ExceptionHandler += new EMSExceptionHandler(handleEx); ... private void handleEx(object sender, EMSExceptionEventArgs arg) { EMSException e = arg.Exception; Console.WriteLine("Exception: " + e.Message); } ...
Exception Type | Condition |
---|---|
IllegalStateException | If the connection is closed |
Connection Class | TIBCO.EMS Namespace