Changeset 1235
- Timestamp:
- 07/17/08 22:34:46 (20 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
zoneparser-tng.cc (modified) (5 diffs)
-
zoneparser-tng.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/zoneparser-tng.cc
r1234 r1235 101 101 102 102 default: 103 throw ZoneParserTNG::exception("Unable to parse time specification '"+str+"' on line "+ 104 lexical_cast<string>(d_filestates.top().d_lineno)+" of file '"+ 105 d_filestates.top().d_filename+"'"); 103 throw ZoneParserTNG::exception("Unable to parse time specification '"+str+"' "+getLineOfFile()); 106 104 } 107 105 return val; … … 219 217 } 220 218 221 219 string ZoneParserTNG::getLineOfFile() 220 { 221 return "on line "+lexical_cast<string>(d_filestates.top().d_lineno)+" of file '"+d_filestates.top().d_filename+"'"; 222 } 222 223 223 224 bool ZoneParserTNG::get(DNSResourceRecord& rr) … … 265 266 } 266 267 else 267 throw exception("Can't parse zone line '"+d_line+"' on line "+lexical_cast<string>(d_filestates.top().d_lineno)+ 268 " of file '"+d_filestates.top().d_filename); 268 throw exception("Can't parse zone line '"+d_line+"' "+getLineOfFile()); 269 269 goto retry; 270 270 } … … 287 287 288 288 if(parts.empty()) 289 throw exception("Line with too little parts ");289 throw exception("Line with too little parts "+getLineOfFile()); 290 290 291 291 string nextpart; … … 327 327 } 328 328 catch(...) { 329 throw runtime_error("Parsing zone content on line "+ 330 lexical_cast<string>(d_filestates.top().d_lineno)+ 331 " of file '"+d_filestates.top().d_filename+"': '"+nextpart+ 329 throw runtime_error("Parsing zone content "+getLineOfFile()+ 330 ": '"+nextpart+ 332 331 "' doesn't look like a qtype, stopping loop"); 333 332 } 334 333 } 335 334 if(!haveQTYPE) 336 throw exception("Malformed line "+ lexical_cast<string>(d_filestates.top().d_lineno)+" of '"+d_filestates.top().d_filename+"':"+d_line+"'");335 throw exception("Malformed line "+getLineOfFile()+": '"+d_line+"'"); 337 336 338 337 rr.content=d_line.substr(range.first); -
trunk/pdns/pdns/zoneparser-tng.hh
r1056 r1235 41 41 void stackFile(const std::string& fname); 42 42 unsigned makeTTLFromZone(const std::string& str); 43 string getLineOfFile(); 43 44 string d_reldir; 44 45 string d_line;