Handling SoapException error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Janjan

    Handling SoapException error

    I want to catch any soapexception error by these method.
    My question is Does creating an instance from assembly name can
    retrieve exception errors from UI? I have read documents on handling
    soapexception errors but i want to make it general on this. Is this
    procedure posible? Because it returns an error message of "HRESULT
    has returned from a call to a COM Component."

    Sir Joe Mayo, I hope you could help me on this. Any idea would be a
    great help! Thanks!

    Chris.

    =============== =============== =============== ==
    catch(Exception err)
    {
    throw (Exception)Crea teObjectInstanc e(err);
    }

    private object CreateObjectIns tance(Exception err)
    {
    Object obj;
    Assembly[] assemblyArray;
    string str = err.Message.Sub string(err.Mess age.IndexOf("---> ") +
    5,
    err.Message.Ind exOf(" (") - err.Message.Ind exOf("---> ") - 5);

    assemblyArray = new
    Assembly[AppDomain.Curre ntDomain.GetAss emblies().Lengt h];
    assemblyArray = AppDomain.Curre ntDomain.GetAss emblies();

    foreach(Assembl y assembly in assemblyArray)
    {
    Type[] mytypes = assembly.GetTyp es();
    foreach(Type t in mytypes)
    {
    if(t.FullName == str)
    {
    obj = Activator.Creat eInstance(t)
    return obj;
    }
    }
    }
    return null;
    }
    =============== =============== =============== ==


    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    Best Usenet Service Providers 2025 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

Working...