Esempio n. 1
0
        private Exception ReadException()
        {
            switch (ReplyStatus)
            {
            case ReplyStatus.UserException:
            {
                var istr = new InputStream(_communicator, Payload, 1);
                istr.StartEncapsulation();
                RemoteException ex = istr.ReadException();
                istr.EndEncapsulation();
                return(ex);
            }

            case ReplyStatus.ObjectNotExistException:
            case ReplyStatus.FacetNotExistException:
            case ReplyStatus.OperationNotExistException:
            {
                return(ReadDispatchException());
            }

            default:
            {
                Debug.Assert(ReplyStatus == ReplyStatus.UnknownException ||
                             ReplyStatus == ReplyStatus.UnknownLocalException ||
                             ReplyStatus == ReplyStatus.UnknownUserException);
                return(ReadUnhandledException());
            }
            }
        }