[longomatch] Raise exceptions when adding a new project fails



commit e14bb7a9eb1135b6670f7f0bfba4705bfc31980f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Oct 6 13:18:44 2014 +0200

    Raise exceptions when adding a new project fails

 LongoMatch.Core/Interfaces/IDatabase.cs |    2 +-
 LongoMatch.Services/Services/FileDB.cs  |    6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/IDatabase.cs b/LongoMatch.Core/Interfaces/IDatabase.cs
index b172fe2..740349a 100644
--- a/LongoMatch.Core/Interfaces/IDatabase.cs
+++ b/LongoMatch.Core/Interfaces/IDatabase.cs
@@ -27,7 +27,7 @@ namespace LongoMatch.Core.Interfaces
 
                Project GetProject(Guid id);
                
-               bool AddProject(Project project);
+               void AddProject(Project project);
                
                bool RemoveProject(Guid id);
                
diff --git a/LongoMatch.Services/Services/FileDB.cs b/LongoMatch.Services/Services/FileDB.cs
index c6770ba..9e66539 100644
--- a/LongoMatch.Services/Services/FileDB.cs
+++ b/LongoMatch.Services/Services/FileDB.cs
@@ -157,7 +157,7 @@ namespace LongoMatch.DB
                        }
                }
 
-               public bool AddProject (Project project)
+               public void AddProject (Project project)
                {
                        string projectFile;
                        
@@ -173,10 +173,8 @@ namespace LongoMatch.DB
                                        Log.Exception (ex);
                                        projectsDB.Delete (project.Description.ID);
                                }
-                               return true;
                        } catch (Exception ex) {
-                               Log.Exception (ex);
-                               return false;
+                               throw ex;
                        }
                }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]