vendredi 7 août 2020

libzdb exception macros are throwing segmentation fault

I have the folliwng code to create a connection pool using the libzdb connection pool library

        {
            MySQLConn &app = MySQLConn::Instance();
            std::string mysqlURL = mysql_conn_string + "/" + mysql_db_name;
            if(!app.poolExists(mysqlURL))
            {
                URL_T url = URL_new(mysqlURL.c_str());
                ConnectionPool_T pool = ConnectionPool_new(url);
                ConnectionPool_setInitialConnections(pool, mysql_initialConnections);
                ConnectionPool_setMaxConnections(pool, mysql_maxConnections);
                ConnectionPool_setConnectionTimeout(pool, mysql_timeout/1000);
                ConnectionPool_start(pool);
                app.SetPool(mysqlURL, pool);
            }
            initialized = true; 
        }    
        CATCH(SQLException)
        {
            std::cout << "SQL error:" << std::endl; 
        }
        END_TRY;```

But the program throws segmentation fault on reaching the CATCH macro. Any suggestions?

Aucun commentaire:

Enregistrer un commentaire