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

index 65cb3f3..04ddeaf 100644 (file)
@@ -66,7 +66,7 @@ namespace Palete {
                                return false;
                        }
                        
-                       Gee.HashMap<int,string> ret = new Gee.HashMap<int,string> ();
+                        
                        var hash = ptype == "listener" ? node.listeners : node.props;
                        
                        // untill we get a smarter renderer..
@@ -93,7 +93,7 @@ namespace Palete {
                        
                        //this.dumpCode(tmpstring);
                        //print("offset %d\n", offset);
-                       this.checkStringSpawn(tmpstring );
+                       return this.checkStringSpawn(tmpstring );
                        
                        // modify report
                        
@@ -157,11 +157,11 @@ namespace Palete {
                         
                }
                
-               public void checkFileSpawn(JsRender.JsRender file )
+               public bool checkFileSpawn(JsRender.JsRender file )
                {
                        // race condition..
                        if (this.compiler != null) { 
-                               return;
+                               return false;
                        }
                        
                        this.file = file;
@@ -182,11 +182,8 @@ namespace Palete {
                        try {
                                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);
-                           this.compiler = null;
+                           GLib.debug(e.message);
+                           return false;
                        }
                         
                }