比如扑捉SoapException的错误信息:
System.Web.Services.Protocols.SoapException: 出错了 at aa.server.JmsWebService.setError(String note) in E:\develop\aa\aa\aa\webservice\aa.vb:line 48 at aa.server.aa.ListSubsidy(Int32 Year, Int32 Month) in E:\develop\aa\aa\aa\webservice\aa.asmx.vb:line 55 但是我现在需要对以上信息进行处理,只读出“出错了”!!!
这个处理该怎么做呢???

解决方案 »

  1.   

    try
    {
    shopweb.SaveMember(Convert.ToInt32(memID),this.t_code.Value,ds,Convert.ToInt32(this.Session["EmpShopID"].ToString()),Convert.ToInt32(this.Session["EmpID"].ToString()))
    }
    catch( SoapException ex)
    {
    this.ep.setErr(ex.Message);
    }我是这样写的,得到的错误信息就是:
    System.Web.Services.Protocols.SoapException: 出错了 at aa.server.JmsWebService.setError(String note) in E:\develop\aa\aa\aa\webservice\aa.vb:line 48 at aa.server.aa.ListSubsidy(Int32 Year, Int32 Month) in E:\develop\aa\aa\aa\webservice\aa.asmx.vb:line 55 
    我想处理一下这个错误信息,就只得到“出错了”!!!大多数就是数据库返回错误信息我该怎么去处理呢???
      

  2.   

    如果扑捉到的错误为:
    System.Web.Services.Protocols.SoapException: 身份证号码错误 at jamieson.server.JmsWebService.setError(String note) in E:\develop\aa\aa\jamieson2k6\webservice\aa.vb:line 48 at aa.server.aa.CheckNew(String Idcard, String IntroduceCode, Int32 Type) in E:\develop\aa\aa\aa\webservice\aa.asmx.vb:line 110则将错误信息处理为: “身份证号码错误”