Exemple #1
0
        public virtual void TestWrapUnknownHostException()
        {
            IOException e       = new UnknownHostException("failed");
            IOException wrapped = VerifyExceptionClass(e, typeof(UnknownHostException));

            AssertInException(wrapped, "failed");
            AssertWikified(wrapped);
            AssertInException(wrapped, "localhost");
            AssertRemoteDetailsIncluded(wrapped);
            AssertInException(wrapped, "/UnknownHost");
        }
Exemple #2
0
 public override void Run()
 {
     try
     {
         //Ans = new [] { NbtAddress.GetByName(Host, Type, Scope, Svr) };
         Ans = NbtAddress.GetAllByName(Host, Type, Scope, Svr);
     }
     catch (UnknownHostException uhe)
     {
         this.Uhe = uhe;
     }
     catch (Exception ex)
     {
         Uhe = new UnknownHostException(ex.Message);
     }
     finally
     {
         lock (Sem)
         {
             Sem.Count--;
             Runtime.Notify(Sem);
         }
     }
 }