GetRootCause() public method

public GetRootCause ( ) : Exception
return System.Exception
Example #1
0
        protected internal virtual IOException SeToIoe(SmbException se)
        {
            IOException ioe  = se;
            Exception   root = se.GetRootCause();

            if (root is TransportException)
            {
                ioe  = (TransportException)root;
                root = ((TransportException)ioe).GetRootCause();
            }
            if (root is Exception)
            {
                ioe = new IOException(root.Message);
                ioe.InitCause(root);
            }
            return(ioe);
        }
		protected internal virtual IOException SeToIoe(SmbException se)
		{
			IOException ioe = se;
			Exception root = se.GetRootCause();
			if (root is TransportException)
			{
				ioe = (TransportException)root;
				root = ((TransportException)ioe).GetRootCause();
			}
			if (root is Exception)
			{
				ioe = new IOException(root.Message);
				ioe.InitCause(root);
			}
			return ioe;
		}