Ignore:
Timestamp:
06/14/11 18:06:30 (13 years ago)
Author:
tbretz
Message:
Commented out some checks; mysqlpp throws exceptions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Configuration.cc

    r10796 r11020  
    389389
    390390    mysqlpp::Connection conn(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
     391    /* throws exceptions
    391392    if (!conn.connected())
    392393    {
    393394        cout << "MySQL connection error: " << conn.error() << endl;
    394395        throw;
    395     }
     396    }*/
    396397
    397398    // Retrieve a subset of the sample stock table set up by resetdb
    398399    // and display it.
    399400    // FIXME: What about a prefix?
    400     mysqlpp::Query query = conn.query("select `Key`, Value from Configuration");
    401 
    402     mysqlpp::StoreQueryResult res = query.store();
     401    const mysqlpp::StoreQueryResult res = conn.query("select `Key`, Value from Configuration").store();
     402    /* throws exceptions
    403403    if (!res)
    404404    {
    405405        cout << "MySQL query failed: " << query.error() << endl;
    406406        throw;
    407     }
     407    }*/
    408408
    409409    set<string> allowed_options;
     
    421421    po::parsed_options result(&desc);
    422422
    423     for (vector<mysqlpp::Row>::iterator v=res.begin(); v<res.end(); v++)
     423    for (vector<mysqlpp::Row>::const_iterator v=res.begin(); v<res.end(); v++)
    424424    {
    425425        const string key = (*v)[0].c_str();
Note: See TracChangeset for help on using the changeset viewer.