zamotivator

Untitled

Feb 3rd, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. try {
  2. const std::string &filename = get_save_index_file();
  3. scoped_istream stream = istream_file(filename);
  4. if(is_gzip_file(filename)) {
  5. try {
  6. read_gz(save_index_cfg, *stream);
  7. } catch (boost::iostreams::gzip_error&) {
  8. read(save_index_cfg, *stream);
  9. }
  10. } else {
  11. read(save_index_cfg, *stream);
  12. }
  13. } catch(io_exception& e) {
  14. ERR_SAVE << "error reading save index: '" << e.what() << "'\n";
  15. } catch(config::error&) {
  16. ERR_SAVE << "error parsing save index config file\n";
  17. save_index_cfg.clear();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment