Cleanup of SpiceManager by introducing exceptions

Catch exceptions in RenderableShadowCylinder and LabelParser
Catch exceptions in RenderableFov and Hongkangparser
This commit is contained in:
Alexander Bock
2015-11-18 16:20:15 -05:00
parent d1ca5bd941
commit fad2c642f8
9 changed files with 440 additions and 439 deletions
+8 -1
View File
@@ -211,7 +211,14 @@ bool LabelParser::create() {
read = line.substr(0, line.find_first_of(" "));
if (read == "STOP_TIME"){
std::string stop = line.substr(line.find("=") + 2);
stop.erase(std::remove(stop.begin(), stop.end(), ' '), stop.end());
stop.erase(
std::remove_if(
stop.begin(),
stop.end(),
[](char c) { return c == ' ' || c == '\r'; }
),
stop.end()
);
openspace::SpiceManager::ref().getETfromDate(stop, _stopTime);
count++;
}