Пример #1
0
        protected virtual bool ExceptionImpl(Ice.Exception ex)
        {
            lock (this)
            {
                _ex = ex;
                if (ChildObserver != null)
                {
                    ChildObserver.Failed(ex.ice_id());
                    ChildObserver.Detach();
                    ChildObserver = null;
                }
                _cancellationHandler = null;

                if (Observer != null)
                {
                    Observer.Failed(ex.ice_id());
                }
                bool invoke = _completionCallback.HandleException(ex, this);
                if (!invoke && Observer != null)
                {
                    Observer.Detach();
                    Observer = null;
                }
                return(invoke);
            }
        }
Пример #2
0
        public override bool Exception(Ice.Exception exc)
        {
            if (ChildObserver != null)
            {
                ChildObserver.Failed(exc.ice_id());
                ChildObserver.Detach();
                ChildObserver = null;
            }

            CachedConnection = null;
            if (Proxy.IceReference.GetInvocationTimeout() == -2)
            {
                Communicator.Timer().Cancel(this);
            }

            //
            // NOTE: at this point, synchronization isn't needed, no other threads should be
            // calling on the callback.
            //
            try
            {
                //
                // It's important to let the retry queue do the retry even if
                // the retry interval is 0. This method can be called with the
                // connection locked so we can't just retry here.
                //
                Communicator.AddRetryTask(this, Proxy.IceHandleException(exc, Handler, Mode, _sent, ref _cnt));
                return(false);
            }
            catch (Ice.Exception ex)
            {
                return(ExceptionImpl(ex)); // No retries, we're done
            }
        }
Пример #3
0
 protected override bool ExceptionImpl(Ice.Exception ex)
 {
     if (Proxy.IceReference.GetInvocationTimeout() != -1)
     {
         Communicator.Timer().Cancel(this);
     }
     return(base.ExceptionImpl(ex));
 }
Пример #4
0
 public void ignoreEx(Ice.Exception ex)
 {
     if (!(ex is Ice.CommunicatorDestroyedException))
     {
         _output.WriteLine(ex.ToString());
         test(false);
     }
 }
Пример #5
0
        public new void Abort(Ice.Exception ex)
        {
            Ice.InvocationMode mode = Proxy.IceReference.GetMode();

            Debug.Assert(mode != Ice.InvocationMode.BatchOneway &&
                         mode != Ice.InvocationMode.BatchDatagram); // not implemented
            base.Abort(ex);
        }
Пример #6
0
 public void exception(Ice.Exception ex)
 {
     if (!(ex is Ice.NoEndpointException))
     {
         _output.WriteLine(ex.ToString());
         test(false);
     }
     test(Dispatcher.isDispatcherThread());
     called();
 }
Пример #7
0
 exception(Ice.Exception ex)
 {
     lock (this)
     {
         _locatorInfo.finishRequest(_ref, _wellKnownRefs, null, ex is Ice.UserException);
         _exception = ex;
         Monitor.PulseAll(this);
     }
     foreach (RequestCallback callback in _callbacks)
     {
         callback.exception(_locatorInfo, ex);
     }
 }
Пример #8
0
 exception(LocatorInfo locatorInfo, Ice.Exception exc)
 {
     try
     {
         locatorInfo.getEndpointsException(_ref, exc); // This throws.
     }
     catch (Ice.LocalException ex)
     {
         if (_callback != null)
         {
             _callback.setException(ex);
         }
     }
 }
Пример #9
0
 public void Abort(Ice.Exception ex)
 {
     Debug.Assert(ChildObserver == null);
     if (ExceptionImpl(ex))
     {
         InvokeExceptionAsync();
     }
     else if (ex is Ice.CommunicatorDestroyedException)
     {
         //
         // If it's a communicator destroyed exception, swallow
         // it but instead notify the user thread. Even if no callback
         // was provided.
         //
         throw ex;
     }
 }
        /// <summary>
        /// Method ice_exception
        /// </summary>
        /// <param name="ex">An Ice.Exception</param>
        public override void ice_exception(Exception ex)
        {
            if (ex is Ferda.Modules.BoxRuntimeError)
            {
                Ferda.Modules.BoxRuntimeError error = (Ferda.Modules.BoxRuntimeError)ex;

                //getting info about the box that has created the exception
                IBoxModule box =
                    projectManager.ModulesManager.GetIBoxModuleByIdentity(error.boxIdentity);

                BoxExceptionClass c = new BoxExceptionClass(box, error.userMessage, ownerOfAddIn);
                Thread th = new Thread(new ThreadStart(c.ThreadStart));
                th.Start();
                //Do not do this there:
                //th.Join();
                parentDialog.AsyncClose();
            }
            //TODO: other exceptions from IBoxModule.RunAction()
        }
Пример #11
0
 public void noException(Ice.Exception ex)
 {
     Console.Error.WriteLine(ex);
     test(false);
 }
Пример #12
0
 public void ignoreEx(Ice.Exception ex)
 {
     test(ex is Ice.CommunicatorDestroyedException);
 }
Пример #13
0
 public void exception(Ice.Exception ex) => _response.called();
Пример #14
0
 exception(Ice.Exception ex)
 {
     test(false);
 }
Пример #15
0
 public void exception(Ice.Exception ex)
 {
     test(ex is Ice.NoEndpointException);
     test(Dispatcher.isDispatcherThread());
     called();
 }
Пример #16
0
 public void exception(Ice.Exception ex)
 {
     test(ex is Ice.ConnectionLostException);
     callback.called();
 }
Пример #17
0
 exception(Ice.Exception ex)
 {
     called();
 }
Пример #18
0
 ex(Ice.Exception ex)
 {
     called();
     throwEx();
 }
Пример #19
0
 public void exception(Ice.Exception ex)
 {
     _cb.ice_exception(ex);
 }
Пример #20
0
 ex(Ice.Exception ex)
 {
 }
Пример #21
0
 public override void ice_exception(Ice.Exception ex)
 {
 }
Пример #22
0
 public override void ice_exception(Ice.Exception ex)
 {
     test(false);
 }
Пример #23
0
 public override void ice_exception(Ice.Exception ex)
 {
     test(ex is Ice.TwowayOnlyException);
     callback.called();
 }
Пример #24
0
 public void exceptionEx(Ice.Exception ex)
 {
     test(ex is Ice.TimeoutException);
     callback.called();
 }
Пример #25
0
 exception(Ice.Exception ex)
 {
 }
Пример #26
0
 public void noException(Ice.Exception ex)
 {
     test(false);
 }
Пример #27
0
 public override void ice_exception(Ice.Exception ex)
 {
     test(ex is Ice.NoEndpointException);
     callback.called();
 }
Пример #28
0
 public virtual bool Exception(Ice.Exception ex) => ExceptionImpl(ex);
Пример #29
0
 public void exception(Ice.Exception ex)
 {
     response();
 }
Пример #30
0
 ex(Ice.Exception ex)
 {
     test(ex is Ice.NoEndpointException);
     called();
 }