Version 4.10.0: Exception messages.

This commit is contained in:
ClemensF 2018-08-25 18:50:52 +02:00
parent b06c9065af
commit bf69faa456
4 changed files with 8 additions and 8 deletions

View file

@ -82,7 +82,7 @@ namespace MapControl
if (values.Length != 4) if (values.Length != 4)
{ {
throw new FormatException("BoundingBox string must be a comma-separated list of four double values"); throw new FormatException("BoundingBox string must be a comma-separated list of four double values.");
} }
return new BoundingBox( return new BoundingBox(

View file

@ -68,7 +68,7 @@ namespace MapControl
if (values.Length != 2) if (values.Length != 2)
{ {
throw new FormatException("Location string must be a comma-separated pair of double values"); throw new FormatException("Location string must be a comma-separated pair of double values.");
} }
return new Location( return new Location(

View file

@ -69,7 +69,7 @@ namespace MapControl
{ {
if (resolution <= 0d) if (resolution <= 0d)
{ {
throw new ArgumentOutOfRangeException("resolution"); throw new ArgumentOutOfRangeException("The parameter resolution must be greater than zero.");
} }
var locations = new LocationCollection(); var locations = new LocationCollection();
@ -91,7 +91,7 @@ namespace MapControl
{ {
if (resolution <= 0d) if (resolution <= 0d)
{ {
throw new ArgumentOutOfRangeException("resolution"); throw new ArgumentOutOfRangeException("The parameter resolution must be greater than zero.");
} }
if (location1.Longitude == location2.Longitude || if (location1.Longitude == location2.Longitude ||
@ -154,21 +154,21 @@ namespace MapControl
{ {
if (resolution <= 0d) if (resolution <= 0d)
{ {
throw new ArgumentOutOfRangeException("resolution"); throw new ArgumentOutOfRangeException("The parameter resolution must be greater than zero.");
} }
var y1 = WebMercatorProjection.LatitudeToY(location1.Latitude); var y1 = WebMercatorProjection.LatitudeToY(location1.Latitude);
if (double.IsInfinity(y1)) if (double.IsInfinity(y1))
{ {
throw new ArgumentOutOfRangeException("location1"); throw new ArgumentOutOfRangeException("The parameter location1 must have an absolute latitude value of less than 90 degrees.");
} }
var y2 = WebMercatorProjection.LatitudeToY(location2.Latitude); var y2 = WebMercatorProjection.LatitudeToY(location2.Latitude);
if (double.IsInfinity(y2)) if (double.IsInfinity(y2))
{ {
throw new ArgumentOutOfRangeException("location2"); throw new ArgumentOutOfRangeException("The parameter location2 must have an absolute latitude value of less than 90 degrees.");
} }
var x1 = location1.Longitude; var x1 = location1.Longitude;

View file

@ -66,7 +66,7 @@ namespace MapControl
if (double.IsInfinity(invDet)) if (double.IsInfinity(invDet))
{ {
throw new InvalidOperationException("Matrix is not invertible"); throw new InvalidOperationException("Matrix is not invertible.");
} }
SetMatrix( SetMatrix(