Changeset 19154
- Timestamp:
- 08/11/18 22:01:57 (6 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fits2sql.cc
r19153 r19154 50 50 #endif 51 51 , "The root file to read from") 52 ("force", po_switch(), "Force processing even if there is no database connection")53 52 ("create", po_switch(), "Create the database if not existing") 54 53 ("drop", po_switch(), "Drop the table (implies create)") … … 319 318 const size_t max = conf.Get<size_t>("max"); 320 319 321 const bool force = conf.Get<bool>("force");322 320 const bool drop = conf.Get<bool>("drop"); 323 321 const bool create = conf.Get<bool>("create") || drop; … … 546 544 // ------------------------------------------------------------------------- 547 545 // Checking for database connection 546 if (verbose>0) 547 cout << "\n---------------------- Connecting database -------------------------" << endl; 548 548 549 549 Database connection(uri); 550 551 try552 {553 if (!force)554 connection.connected();555 }556 catch (const exception &e)557 {558 cerr << "SQL connection failed: " << e.what() << '\n' << endl;559 return 4;560 }561 550 562 551 if (verbose>0) -
trunk/FACT++/src/root2sql.cc
r19153 r19154 54 54 #endif 55 55 , "The root file to read from") 56 ("force", po_switch(), "Force processing even if there is no database connection")57 56 ("create", po_switch(), "Create the database if not existing") 58 57 ("drop", po_switch(), "Drop the table (implies create)") … … 348 347 const int64_t max = conf.Get<int64_t>("max"); 349 348 350 const bool force = conf.Get<bool>("force");351 349 const bool drop = conf.Get<bool>("drop"); 352 350 const bool create = conf.Get<bool>("create") || drop; … … 585 583 586 584 Database connection(uri); 587 588 try589 {590 if (!force)591 connection.connected();592 }593 catch (const exception &e)594 {595 cerr << "SQL connection failed: " << e.what() << '\n' << endl;596 return 3;597 }598 585 599 586 if (verbose>0)
Note:
See TracChangeset
for help on using the changeset viewer.