[gitg/bug/721747] Do not silently ignore pre-commit spawn errors



commit 8f6494fdaf1e4a8a3778439003396bd87e997e74
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Wed Jan 8 14:56:33 2014 +0100

    Do not silently ignore pre-commit spawn errors

 libgitg/gitg-stage.vala |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/libgitg/gitg-stage.vala b/libgitg/gitg-stage.vala
index de55461..3347079 100644
--- a/libgitg/gitg-stage.vala
+++ b/libgitg/gitg-stage.vala
@@ -246,18 +246,18 @@ public class Stage : Object
 
                                setup_commit_hook_environment(hook, author);
 
-                               try
-                               {
-                                       int status = hook.run_sync(d_repository);
+                               int status = hook.run_sync(d_repository);
 
-                                       if (status != 0)
-                                       {
-                                               errormsg = string.joinv("\n", hook.output);
-                                       }
+                               if (status != 0)
+                               {
+                                       errormsg = string.joinv("\n", hook.output);
                                }
-                               catch (SpawnError e) {}
                        });
-               } catch {}
+               }
+               catch (Error e)
+               {
+                       errormsg = e.message;
+               }
 
                if (errormsg != null)
                {


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