gov.va.medora.mdo.dao.vista.VistaUserDao.getException C# (CSharp) Method

getException() private method

private getException ( string result ) : Exception
result string
return System.Exception
        internal Exception getException(string result)
        {
            if (result.IndexOf("The context") != -1 &&
                result.IndexOf("does not exist on server") != -1)
            {
                return new PermissionNotFoundException(result);
            }
            if (result.IndexOf("User") != -1 &&
                result.IndexOf("does not have access to option") != -1)
            {
                return new UnauthorizedAccessException(result);
            }
            if (result.IndexOf("Option locked") != -1 &&
                result.IndexOf("does not have access to option") != -1)
            {
                return new PermissionLockedException(result);
            }
            return new Exception(result);
        }
VistaUserDao