Exemple #1
0
        internal CifsIoException(int errorclass, int errorcode)
        {
            fSMBErrorClass = errorclass;
            fSMBErrorCode  = errorcode;
            string key;

            if (errorclass == ERROR_CMD)
            {
                key = "255:0";
            }
            else
            {
                key = (errorclass & 0xff) + ":" + (errorcode & 0xffff);
            }

            try
            {
                fMessage = CifsRuntimeException.GetMessage(key);
            }
            catch (Exception) // The key was not found
            {
                fMessage = CifsRuntimeException.GetMessage("U:U");
            }

            fMessage = fMessage + "( SMB=" + key + ")";
        }
Exemple #2
0
        internal static CifsIoException getNBException(int code)
        {
            CifsIoException e = new CifsIoException();

            try
            {
                e.fMessage = CifsRuntimeException.GetMessage("NB" + code);
            }
            catch (Exception)
            {
                e.fMessage = CifsRuntimeException.GetMessage("NB999", code);
            }
            return(e);
        }
Exemple #3
0
        internal static CifsIoException getLMException(int code)
        {
            CifsIoException e = new CifsIoException();

            try
            {
                e.fMessage = CifsRuntimeException.GetMessage("LM" + code);
            }
            catch (Exception)
            {
                e.fMessage = CifsRuntimeException.GetMessage("LMERROR", code);
                if (Debug.DebugOn)
                {
                    Debug.WriteLine(Debug.Warning, "LM Error: " + code + " not defined.");
                }
            }
            return(e);
        }
Exemple #4
0
 internal CifsIoException(string key, object i1, object i2)
 {
     fMessage = CifsRuntimeException.GetMessage(key, i1, i2);
 }
Exemple #5
0
 public CifsIoException(string key)
 {
     fMessage = CifsRuntimeException.GetMessage(key);
 }