Spawn.vala
authorAlan Knowles <alan@roojs.com>
Mon, 14 Aug 2017 03:25:41 +0000 (11:25 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 14 Aug 2017 03:25:41 +0000 (11:25 +0800)
Spawn.vala

index d9f1697..c99f962 100644 (file)
@@ -356,11 +356,13 @@ public class Spawn : Object
                        var errstr = this.output;
                        errstr += errstr.length > 0 ? "\n" : "";
                        errstr += this.stderr;
+                       print("Throwing execute error:%s\n", errstr);
             throw new SpawnError.EXECUTE_ERROR(errstr);
             //this.toString = function() { return this.stderr; };
             ///throw new Exception this; // we throw self...
         }
         
+        
         // finally throw, or return self..
         
         return;
@@ -457,7 +459,9 @@ public class Spawn : Object
                return false;
                 
             }
-            
+            if (buffer == null) {
+                       return false;
+               }
             print("got buffer of %s\n", buffer);
             // print('status: '  +JSON.stringify(status));
             // print(JSON.stringify(x));