The NMS Class Library (.Net Messaging Library)

Connection.OnException Method 

protected void OnException(
   ITransport sender,
   Exception exception
);

See Also

Connection Class | ActiveMQ Namespace