Notify tile parsing errors
The tile parsing is done in a worker thread and if it fails, we set the tile state to "obsolete" and set an error message. When the completion callback is fired, we check for the error message and if it is set, we emit the error signal. The trick here is the signal cannot be emitted directly from the worker thread because that would violate data ownership rules.
This commit is contained in:
@@ -59,9 +59,9 @@ void VectorTileData::parse() {
|
||||
setState(State::parsed);
|
||||
}
|
||||
} catch (const std::exception& ex) {
|
||||
Log::Error(Event::ParseTile, "Parsing [%d/%d/%d] failed: %s", id.z, id.x, id.y, ex.what());
|
||||
setState(State::obsolete);
|
||||
return;
|
||||
std::stringstream message;
|
||||
message << "Failed to parse [" << int(id.z) << "/" << id.x << "/" << id.y << "]: " << ex.what();
|
||||
setError(message.str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user