[chronojump] Added try catch if R missing on stats/graph



commit cf3e05af99a45d184c82f8f88de195f5fb43ecae
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Mar 27 11:31:45 2014 +0100

    Added try catch if R missing on stats/graph

 src/util.cs |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/util.cs b/src/util.cs
index ebce3dd..6f74217 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -941,16 +941,16 @@ public class Util
                pinfo.CreateNoWindow = true;
                pinfo.UseShellExecute = false;
        
-               //try { 
-               r = new Process();
-               r.StartInfo = pinfo;
-               r.Start();
-               r.WaitForExit();
-               //while ( ! ( File.Exists(outputFile) || CancelRScript) );
-               while ( ! ( File.Exists(outputFile) ) );
-               //} catch {
+               try {   
+                       r = new Process();
+                               r.StartInfo = pinfo;
+                               r.Start();
+                       r.WaitForExit();
+                       //while ( ! ( File.Exists(outputFile) || CancelRScript) );
+                       while ( ! ( File.Exists(outputFile) ) );
+               } catch {
                        //maybe R is not installed
-               //}
+               }
        }
        
 


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