Changeset 3412 for trunk/yat/omic/BamHeader.cc
- Timestamp:
- Apr 23, 2015, 1:00:30 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/omic/BamHeader.cc
r3410 r3412 26 26 #include "yat/utility/Exception.h" 27 27 #include "yat/utility/split.h" 28 #include "yat/utility/stl_utility.h" 28 29 29 30 // we need to include 'sam_header.h' when compiling against libbam … … 99 100 } 100 101 } 101 if (table.empty()) 102 table[""][""]; // to avoid re-parsing 103 } 104 return table[id][key]; 102 } 103 strMap2::const_iterator line_table = table.find(id); 104 if (line_table == table.end()) { 105 std::string msg = "@" + type + ": unknown ID: '" + id + "'"; 106 throw utility::runtime_error(msg); 107 } 108 strMap::const_iterator it = line_table->second.find(key); 109 if (it == line_table->second.end()) { 110 std::string msg = "@" + type + ": unknown KEY: '" + key + "'"; 111 throw utility::runtime_error(msg); 112 } 113 return it->second; 105 114 } 106 115
Note: See TracChangeset
for help on using the changeset viewer.