Guest User

Untitled

a guest
Apr 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. int a = 1;
  2. float b = 2.12f;
  3. std::string c = "hello";
  4.  
  5. try {
  6. thebc::transaction t();
  7. t.add( a );
  8. t.add( b );
  9. t.add( c );
  10.  
  11. a = fetch_a();
  12. b = fetch_b();
  13. c = fetch_c();
  14.  
  15. t.commit();
  16. }
  17. catch(..) {
  18. ...
  19. }
Add Comment
Please, Sign In to add comment