Beispiel #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);
            }
        }
Beispiel #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
            }
        }
Beispiel #3
0
 protected override bool ExceptionImpl(Ice.Exception ex)
 {
     if (Proxy.IceReference.GetInvocationTimeout() != -1)
     {
         Communicator.Timer().Cancel(this);
     }
     return(base.ExceptionImpl(ex));
 }
Beispiel #4
0
 public void ignoreEx(Ice.Exception ex)
 {
     if (!(ex is Ice.CommunicatorDestroyedException))
     {
         _output.WriteLine(ex.ToString());
         test(false);
     }
 }
Beispiel #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);
        }
Beispiel #6
0
 public void exception(Ice.Exception ex)
 {
     if (!(ex is Ice.NoEndpointException))
     {
         _output.WriteLine(ex.ToString());
         test(false);
     }
     test(Dispatcher.isDispatcherThread());
     called();
 }
Beispiel #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);
     }
 }
Beispiel #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);
         }
     }
 }
Beispiel #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()
        }
Beispiel #11
0
 public void noException(Ice.Exception ex)
 {
     Console.Error.WriteLine(ex);
     test(false);
 }
Beispiel #12
0
 public void ignoreEx(Ice.Exception ex)
 {
     test(ex is Ice.CommunicatorDestroyedException);
 }
Beispiel #13
0
 public void exception(Ice.Exception ex) => _response.called();
Beispiel #14
0
 exception(Ice.Exception ex)
 {
     test(false);
 }
Beispiel #15
0
 public void exception(Ice.Exception ex)
 {
     test(ex is Ice.NoEndpointException);
     test(Dispatcher.isDispatcherThread());
     called();
 }
Beispiel #16
0
 public void exception(Ice.Exception ex)
 {
     test(ex is Ice.ConnectionLostException);
     callback.called();
 }
Beispiel #17
0
 exception(Ice.Exception ex)
 {
     called();
 }
Beispiel #18
0
 ex(Ice.Exception ex)
 {
     called();
     throwEx();
 }
Beispiel #19
0
 public void exception(Ice.Exception ex)
 {
     _cb.ice_exception(ex);
 }
Beispiel #20
0
 ex(Ice.Exception ex)
 {
 }
Beispiel #21
0
 public override void ice_exception(Ice.Exception ex)
 {
 }
Beispiel #22
0
 public override void ice_exception(Ice.Exception ex)
 {
     test(false);
 }
Beispiel #23
0
 public override void ice_exception(Ice.Exception ex)
 {
     test(ex is Ice.TwowayOnlyException);
     callback.called();
 }
Beispiel #24
0
 public void exceptionEx(Ice.Exception ex)
 {
     test(ex is Ice.TimeoutException);
     callback.called();
 }
Beispiel #25
0
 exception(Ice.Exception ex)
 {
 }
Beispiel #26
0
 public void noException(Ice.Exception ex)
 {
     test(false);
 }
Beispiel #27
0
 public override void ice_exception(Ice.Exception ex)
 {
     test(ex is Ice.NoEndpointException);
     callback.called();
 }
Beispiel #28
0
 public virtual bool Exception(Ice.Exception ex) => ExceptionImpl(ex);
Beispiel #29
0
 public void exception(Ice.Exception ex)
 {
     response();
 }
Beispiel #30
0
 ex(Ice.Exception ex)
 {
     test(ex is Ice.NoEndpointException);
     called();
 }