void CallHandlerRemoved0(FABHandlerContext ctx)
 {
     // Notify the complete removal.
     try
     {
         try
         {
             ctx.Handler.HandlerRemoved(ctx);
         }
         finally
         {
             ctx.SetRemoved();
         }
     }
     catch (Exception ex)
     {
         this.FireExceptionCaught(new FABChannelPipelineException("{0}.HandlerRemoved() has thrown an exception. {1}", ctx.Handler.GetType().Name, ex));
     }
 }
        void CallHandlerAdded0(FABHandlerContext ctx)
        {
            try
            {
                ctx.Handler.HandlerAdded(ctx);
                ctx.SetAdded();
            }
            catch (Exception ex)
            {
                bool removed = false;
                try
                {
                    Remove0(ctx);
                    try
                    {
                        ctx.Handler.HandlerRemoved(ctx);
                    }
                    finally
                    {
                        ctx.SetRemoved();
                    }
                    removed = true;
                }
                catch (Exception ex2)
                {
                    throw ex2;
                }

                if (removed)
                {
                    this.FireExceptionCaught(new FABChannelPipelineException("{0}.HandlerAdded() has thrown an exception; {1} removed.", ctx.Handler.GetType().Name, ex));
                }
                else
                {
                    this.FireExceptionCaught(new FABChannelPipelineException("{0}.HandlerAdded() has thrown an exception; {1} also failed to remove.", ctx.Handler.GetType().Name, ex));
                }
            }
        }