fixed bugs
removed some error reporting in cases where the errors are somewhat expected and handled
This commit is contained in:
@@ -165,7 +165,7 @@ namespace keepass2android.Io
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Kp2aLog.LogUnexpectedError(e);
|
||||
Kp2aLog.Log(e.ToString());
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ namespace keepass2android.Io
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
else throw new Exception("couldn't move to first result element");
|
||||
else throw new Exception("couldn't move to first result element: " + (cursor == null) + uri.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace keepass2android.Io
|
||||
return _streamCacheDir + iocAsHexString;
|
||||
}
|
||||
|
||||
private bool IsCached(IOConnectionInfo ioc)
|
||||
public bool IsCached(IOConnectionInfo ioc)
|
||||
{
|
||||
return File.Exists(CachedFilePath(ioc))
|
||||
&& File.Exists(VersionFilePath(ioc))
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace keepass2android
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Kp2aLog.LogUnexpectedError(e);
|
||||
Kp2aLog.Log(e.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -122,13 +122,14 @@ namespace keepass2android
|
||||
Root = pwDatabase.RootGroup;
|
||||
PopulateGlobals(Root);
|
||||
|
||||
Loaded = true;
|
||||
|
||||
KpDatabase = pwDatabase;
|
||||
SearchHelper = new SearchDbHelper(app);
|
||||
|
||||
_databaseFormat = databaseFormat;
|
||||
|
||||
CanWrite = databaseFormat.CanWrite && !fileStorage.IsReadOnly(iocInfo);
|
||||
Loaded = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -203,6 +204,8 @@ namespace keepass2android
|
||||
|
||||
public PwGroup Search(SearchParameters searchParams, IDictionary<PwUuid, KeyValuePair<string, string>> resultContexts)
|
||||
{
|
||||
if (SearchHelper == null)
|
||||
throw new Exception("SearchHelper is null");
|
||||
return SearchHelper.Search(this, searchParams, resultContexts);
|
||||
}
|
||||
|
||||
@@ -273,6 +276,8 @@ namespace keepass2android
|
||||
}
|
||||
|
||||
public void Clear() {
|
||||
_loaded = false;
|
||||
|
||||
Groups.Clear();
|
||||
Entries.Clear();
|
||||
Dirty.Clear();
|
||||
@@ -280,7 +285,7 @@ namespace keepass2android
|
||||
|
||||
Root = null;
|
||||
KpDatabase = null;
|
||||
_loaded = false;
|
||||
|
||||
CanWrite = true;
|
||||
_reloadRequested = false;
|
||||
OtpAuxFileIoc = null;
|
||||
|
||||
@@ -83,6 +83,8 @@ namespace keepass2android
|
||||
}
|
||||
catch (Java.Lang.Exception e)
|
||||
{
|
||||
if (e.Message == "Invalid key!")
|
||||
throw new InvalidCompositeKeyException();
|
||||
throw new Exception(e.LocalizedMessage ??
|
||||
e.Message ??
|
||||
e.GetType().Name, e);
|
||||
|
||||
Reference in New Issue
Block a user