Spawn.vala
authorAlan Knowles <alan@roojs.com>
Fri, 2 May 2014 10:25:16 +0000 (18:25 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 2 May 2014 10:25:16 +0000 (18:25 +0800)
Spawn.vala

index a81920a..afe1cad 100644 (file)
@@ -100,6 +100,10 @@ public class  SpawnConfig {
     
 }
 
+errordomain SpawnError {
+    NO_ARGS
+}
+
 /**
  * @class Spawn
  * @param cfg {SpawnConfig} settings - see properties.
@@ -132,7 +136,7 @@ public class Spawn : Object
     
         this.cfg.cwd =  this.cfg.cwd.length  < 1 ? GLib.Environment.get_home_dir() : this.cfg.cwd;
         if (this.cfg.args.length < 0) {
-            throw new Error("No arguments");
+            throw new SpawnError.NO_ARGS("No arguments");
         }
         this.run();