src/Palete/ValaSource.vala
authorAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2022 06:47:42 +0000 (14:47 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 9 Sep 2022 06:47:42 +0000 (14:47 +0800)
src/Palete/ValaSource.vala

index b34ff31..5627f94 100644 (file)
@@ -336,8 +336,12 @@ namespace Palete {
                        }
                        OutputStream ostream = iostream.output_stream;
                        DataOutputStream dostream = new DataOutputStream (ostream);
-                       dostream.put_string (contents);
-                       
+                       try {
+                               dostream.put_string (contents);
+                       } catch(GLib.Error e) {
+                               GLib.debug("Failed to write to tempoary file %s", e.message);
+                               return false;
+                       }
                        var target = pr.firstBuildModule();
                        if (target.length < 1) {
                                return false;