万卷书   首页 > 电脑书籍 > Web服务器 > Web服务中的异常处理(2)
 
   command.ExecuteNonQuery();

   }

   else

   throw

   RaiseException("AddCategories",

   "http://tempuri.org/CategoriesService",

   builder.ToString(),

   "2000","AddCategories",FaultCode.Client);

   }

   returntrue;

   }

   catch(SoapExceptionsoapEx)

   {

   throwsoapEx;

   }

   catch(Exceptionex)

   {

   EventLog.WriteEntry("Test",ex.Message);

   throw

   RaiseException("AddCategories",

   "http://tempuri.org/CategoriesService",ex.Message,

     "1000",ex.Source,FaultCode.Server);

   }

   }

上一页 下一页