size_t pos;
pos = connstr.find_first_of(":");
if (pos == std::string::npos)
- throw new AhuException("Invalid connection string: malformed");
+ throw AhuException("Invalid connection string: malformed");
type = connstr.substr(0, pos);
opts = connstr.substr(pos+1);
// connectors know what they are doing
if (type == "unix") {
this->connector = new UnixsocketConnector(options);
-#ifdef REMOTEBACKEND_HTTP
} else if (type == "http") {
+#ifdef REMOTEBACKEND_HTTP
this->connector = new HTTPConnector(options);
+#else
+ throw AhuException("Invalid connection string: http connector support not enabled. Recompile with --enable-remotebackend-http");
#endif
} else if (type == "pipe") {
this->connector = new PipeConnector(options);
} else {
- throw new AhuException("Invalid connection string: unknown connector");
+ throw AhuException("Invalid connection string: unknown connector");
}
return -1;
// make sure we got zone & kind
if (!answer.HasMember("zone")) {
L<<Logger::Error<<kBackendId<<"Missing zone in getDomainInfo return value"<<endl;
- throw new AhuException();
+ throw AhuException();
}
value = -1;
// parse return value. we need at least zone,serial,kind