src/Palete/ValaSource.vala
authorAlan Knowles <alan@roojs.com>
Thu, 28 May 2015 05:50:04 +0000 (13:50 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 28 May 2015 05:50:04 +0000 (13:50 +0800)
src/Palete/ValaSource.vala

index 36f151a..4c73a11 100644 (file)
@@ -249,18 +249,18 @@ namespace Palete {
                        args += file.path;
                         
                        
-                       this.compiler = new Spawn("/tmp", args);
-                       this.compiler.complete.connect(spawnResult);
+                       
                        
                        try {
+                           this.compiler = new Spawn("/tmp", args);
+                           this.compiler.complete.connect(spawnResult);
                            this.compiler.run(); 
-                       } catch (GLib.SpawnError e) {
-                           var ret = new Json.Object();
-                           ret.set_boolean_member("success", false);
-                           ret.set_string_member("message", e.message);
-                           this.compiled(ret);
+                       } catch (GLib.Error e) {
+                           
                            this.compiler = null;
+                           return false;
                        }
+                       return true;
                         
                }