Handle postgresql and sqlite3 libs properly
Do not fail to compile when one of them is missing but the other one is not. Raise an error when trying to open a database with the missing library. see #3237
This commit is contained in:
+2
-3
@@ -6,8 +6,6 @@
|
||||
#include <utils/xdg.hpp>
|
||||
#include <utils/reload.hpp>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#ifdef UDNS_FOUND
|
||||
# include <network/dns_handler.hpp>
|
||||
#endif
|
||||
@@ -90,7 +88,8 @@ int main(int ac, char** av)
|
||||
#ifdef USE_DATABASE
|
||||
try {
|
||||
open_database();
|
||||
} catch (...) {
|
||||
} catch (const std::exception& e) {
|
||||
log_error(e.what());
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user