Exemple #1
0
 private void exception(Ice.Current current)
 {
     if(current.operation.Equals("ice_ids"))
     {
         throw new Test.TestIntfUserException();
     }
     else if(current.operation.Equals("requestFailedException"))
     {
         throw new ObjectNotExistException();
     }
     else if(current.operation.Equals("unknownUserException"))
     {
         UnknownUserException ex = new UnknownUserException();
         ex.unknown = "reason";
         throw ex;
     }
     else if(current.operation.Equals("unknownLocalException"))
     {
         UnknownLocalException ex = new UnknownLocalException();
         ex.unknown = "reason";
         throw ex;
     }
     else if(current.operation.Equals("unknownException"))
     {
         UnknownException ex = new UnknownException();
         ex.unknown = "reason";
         throw ex;
     }
     else if(current.operation.Equals("userException"))
     {
         throw new TestIntfUserException();
     }
     else if(current.operation.Equals("localException"))
     {
         SocketException ex = new SocketException();
         ex.error = 0;
         throw ex;
     }
     else if(current.operation.Equals("csException"))
     {
         throw new System.Exception("message");
     }
     else if(current.operation.Equals("unknownExceptionWithServantException"))
     {
         throw new UnknownException("reason");
     }
     else if(current.operation.Equals("impossibleException"))
     {
         throw new Test.TestIntfUserException(); // Yes, it really is meant to be TestIntfException.
     }
     else if(current.operation.Equals("intfUserException"))
     {
         throw new Test.TestImpossibleException(); // Yes, it really is meant to be TestImpossibleException.
     }
     else if(current.operation.Equals("asyncResponse"))
     {
         throw new Test.TestImpossibleException();
     }
     else if(current.operation.Equals("asyncException"))
     {
         throw new Test.TestImpossibleException();
     }
 }
Exemple #2
0
 private void exception(Current current)
 {
     if (current.Operation.Equals("ice_ids"))
     {
         throw new TestIntfUserException();
     }
     else if (current.Operation.Equals("requestFailedException"))
     {
         throw new ObjectNotExistException();
     }
     else if (current.Operation.Equals("unknownUserException"))
     {
         var ex = new UnknownUserException();
         ex.Unknown = "reason";
         throw ex;
     }
     else if (current.Operation.Equals("unknownLocalException"))
     {
         var ex = new UnknownLocalException();
         ex.Unknown = "reason";
         throw ex;
     }
     else if (current.Operation.Equals("unknownException"))
     {
         var ex = new UnknownException();
         ex.Unknown = "reason";
         throw ex;
     }
     else if (current.Operation.Equals("userException"))
     {
         throw new TestIntfUserException();
     }
     else if (current.Operation.Equals("localException"))
     {
         var ex = new SocketException();
         ex.Error = 0;
         throw ex;
     }
     else if (current.Operation.Equals("csException"))
     {
         throw new System.Exception("message");
     }
     else if (current.Operation.Equals("unknownExceptionWithServantException"))
     {
         throw new UnknownException("reason");
     }
     else if (current.Operation.Equals("impossibleException"))
     {
         throw new TestIntfUserException(); // Yes, it really is meant to be TestIntfException.
     }
     else if (current.Operation.Equals("intfUserException"))
     {
         throw new TestImpossibleException(); // Yes, it really is meant to be TestImpossibleException.
     }
     else if (current.Operation.Equals("asyncResponse"))
     {
         throw new TestImpossibleException();
     }
     else if (current.Operation.Equals("asyncException"))
     {
         throw new TestImpossibleException();
     }
 }