]> WPIA git - cassiopeia.git/commitdiff
fix: catch another exception
authorFelix Dörre <felix@dogcraft.de>
Wed, 14 Oct 2015 22:46:10 +0000 (00:46 +0200)
committerFelix Dörre <felix@dogcraft.de>
Wed, 14 Oct 2015 22:46:10 +0000 (00:46 +0200)
src/apps/client.cpp
src/db/psql.cpp

index 71d41dbd2ccf98e3e6d17ed7b152dac69a44e793..96e5b67442bf94046cb01dba31e3a9c25f0fc56b 100644 (file)
@@ -110,8 +110,12 @@ int main( int argc, const char* argv[] ) {
             lastCRLCheck = current;
         }
 
-        std::shared_ptr<Job> job = jp->fetchJob();
-
+        std::shared_ptr<Job> job;
+       try {
+       job = jp->fetchJob();
+       } catch ( std::exception &e ){
+               logger::errorf ( "Exception while fetchJob: %s", e.what() );
+       }
         if( !job ) {
             logger::note( "Nothing to work on." );
             sleep( 5 );
index 44bc15077aad07a582b9d391c16b850eb81094e9..619c3a7d0f468e807ed1d8714561971b82e6186c 100644 (file)
@@ -7,7 +7,7 @@
 #include <log/logger.hpp>
 
 PostgresJobProvider::PostgresJobProvider( const std::string& server, const std::string& user, const std::string& password, const std::string& database ):
-    c("dbname="+database+" host="+server+" user="+user+" password="+password){
+    c("dbname="+database+" host="+server+" user="+user+" password=" + password + " client_encoding=UTF-8 application_name=cassiopeia-client"){
     // TODO better connection string generation??
 }