src/Builder4/ValaCompileErrors.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2022 01:50:32 +0000 (09:50 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2022 01:50:32 +0000 (09:50 +0800)
src/Builder4/ValaCompileErrors.vala

src/Builder4/ValaCompileErrors.bjs
src/Builder4/ValaCompileErrors.vala

index a0f5788..e2961f6 100644 (file)
            "        return false;",
            "    ",
            "    }",
-           "    ",
-           "    var pf = JsRender.JsRender.factory(\"PlainFile\", p, fname);",
-           "    _this.window.windowstate.fileViewOpen(pf, true, line);",
-           "    ",
+           "    try {",
+           "\t\tvar pf = JsRender.JsRender.factory(\"PlainFile\", p, fname);",
+           "\t\t_this.window.windowstate.fileViewOpen(pf, true, line);",
+           "    } catch (JsRender.Error e) {}",
            "    // try hiding the left nav..",
            " ",
            "    return false;",
index ac5d0a9..508aa87 100644 (file)
@@ -338,10 +338,10 @@ public class Xcls_ValaCompileErrors : Object
                     return false;
                 
                 }
-                
-                var pf = JsRender.JsRender.factory("PlainFile", p, fname);
-                _this.window.windowstate.fileViewOpen(pf, true, line);
-                
+                try {
+                       var pf = JsRender.JsRender.factory("PlainFile", p, fname);
+                       _this.window.windowstate.fileViewOpen(pf, true, line);
+                } catch (JsRender.Error e) {}
                 // try hiding the left nav..
              
                 return false;