mapbox / mapbox-sdk-cs

C# libraries for Mapbox API layer
https://mapbox.github.io/mapbox-sdk-cs/
Other
20 stars 11 forks source link

Remove generic "ParseError" from Tile.cs #72

Closed david-rhodes closed 7 years ago

david-rhodes commented 7 years ago

Reference: https://github.com/mapbox/mapbox-unity-sdk/issues/45

VectorTile.cs sets an error if unable to parse the byte data:

                internal override bool ParseTileData(byte[] data)
        {
            try
            {
                var decompressed = Compression.Decompress(data);
                this.data = new Mapbox.VectorTile.VectorTile(decompressed);

                return true;
            }
            catch (Exception ex)
            {
                Debug.Log("VectorTile: " + "WTF");
                SetError("VectorTile parsing failed: " + ex.ToString());
                return false;
            }
        }

but the error is then overridden in Tile.cs:

else if (this.ParseTileData(response.Data) == false)
{
    this.error = "ParseError";
}
wilhelmberg commented 7 years ago

Done in #75