summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-12-01 14:59:22 +0100
committerlouiz’ <louiz@louiz.org>2017-12-02 20:08:50 +0100
commit414bbca0bc2bf20c4f424c2368997a46129b32cc (patch)
treec9e67c8eedee84963ecc920d8158738770f9238e /src/main.cpp
parent923cf31ba62ebfd2369a9594a60020477730b649 (diff)
downloadbiboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.tar.gz
biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.tar.bz2
biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.tar.xz
biboumi-414bbca0bc2bf20c4f424c2368997a46129b32cc.zip
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 284d289..c877e43 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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