[longomatch] Catch corrupted database exceptions correctly
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Catch corrupted database exceptions correctly
- Date: Wed, 16 Apr 2014 15:54:09 +0000 (UTC)
commit f26263f46cbb21f399368ee96ce2075b00846deb
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Apr 16 17:47:25 2014 +0200
Catch corrupted database exceptions correctly
LongoMatch.Services/Services/DataBase.cs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Services/Services/DataBase.cs b/LongoMatch.Services/Services/DataBase.cs
index e071b4e..72c660d 100644
--- a/LongoMatch.Services/Services/DataBase.cs
+++ b/LongoMatch.Services/Services/DataBase.cs
@@ -150,13 +150,13 @@ namespace LongoMatch.DB
GetDBVersion();
GetBackupDate();
CheckDB();
+ count = GetAllProjects().Count;
try {
BackupDB();
} catch (Exception e) {
Log.Error("Error creating database backup");
Log.Exception(e);
}
- count = GetAllProjects().Count;
} catch (DatabaseFileLockedException locked) {
throw new DBLockedException (locked);
} catch (Db4oException ex) {
@@ -193,6 +193,8 @@ namespace LongoMatch.DB
Log.Exception(e);
}
}
+ } catch (Exception ex) {
+ Log.Exception (ex);
}
finally
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]