Correctly report failure to find a service description.
authorDavin McCall <davmac@davmac.org>
Fri, 22 Jun 2018 08:39:18 +0000 (09:39 +0100)
committerDavin McCall <davmac@davmac.org>
Fri, 22 Jun 2018 08:39:18 +0000 (09:39 +0100)
src/load-service.cc

index c0c9eff39bf369e5722b054c083fadddc9245dc8..b26d318bc8d523f81ea82a97ee80972fd53bbdf1 100644 (file)
@@ -434,6 +434,10 @@ service_record * dirload_service_set::load_service(const char * name)
         if (service_file) break;
     }
     
+    if (! service_file) {
+        throw service_not_found(string(name));
+    }
+
     string command;
     list<pair<unsigned,unsigned>> command_offsets;
     string stop_command;