Catch exceptions when parsing tile PBFs
Also improved the error message and updated the test case.
This commit is contained in:
committed by
John Firebaugh
parent
3670a78569
commit
d30fce5f7d
@@ -76,7 +76,9 @@ bool VectorTileData::reparse(Worker&, std::function<void()> callback) {
|
||||
if (result.is<State>()) {
|
||||
state = result.get<State>();
|
||||
} else {
|
||||
error = result.get<std::string>();
|
||||
std::stringstream message;
|
||||
message << "Failed to parse [" << std::string(id) << "]: " << result.get<std::string>();
|
||||
error = message.str();
|
||||
state = State::obsolete;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user