using System;

namespace skyscraper5.Skyscraper.Gps.GeoIp
{
	[Serializable]
	public class GeoIpException : GpsException
	{
		public GeoIpError Error { get; }
		public int CooldownTime { get; }

		public GeoIpException(GeoIpError error, int cooldownTime, string somethingBadHappened)
		{
			Error = error;
			CooldownTime = cooldownTime;
		}

		public GeoIpException(GeoIpError error, int cooldownTime)
		: this(error,cooldownTime,error.ToString())
		{
		}
	}

	public enum GeoIpError
	{
		NoDatabaseAndDownloadFailed,
		NotGzip,
		InvalidMmdb,
		MmdbError
	}
}
