Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

Commented Issue: Distance.Parse is inconsistant with invalid input [24937]

$
0
0
Distance.Parse throws an exception when a number with an unrecognized unit is entered:

```
Distance.Parse("3 this should not be valid");
```

This is fine, but if the number is removed:

```
Distance.Parse("this should not be valid");
```

Then the function returns a Distance object set to "0 ft" and IsInvalid=false.

Invalid text without a number should throw an exception.
Comments: Associated with changeset 73712: Fixed #24937: Distance.Parse is inconsistant with invalid input

Viewing all articles
Browse latest Browse all 3973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>