Library for handling NMEA message in Windows Desktop, Store, Phone, Universal, and Xamarin (Android + iOS), coming from files, bluetooth, serial port or any stream
I am getting a null value exception parsing sentences when there is missing data. I know the sentence is invalid, but it would be helpful if the exception was being handled cleaner.
The sentence: $GPGGA,181651.98,LAT,DIR,LON,DIR,0,,,,M,,M,,*43
Looking at the code in the GGA constructor I believe the culprit is:
NumberOfSatellites = int.Parse(message[6], CultureInfo.InvariantCulture);
The sentence for the number of satellites is an empty string, so int.Parse is throwing the exception. As I mentioned I know the issue is a bad sentence being received, but handling a little cleaner would be helpful
Just a note: As I have told you before, love this library. It has saved countless hours having a simple to implement NMEA parser
I am getting a null value exception parsing sentences when there is missing data. I know the sentence is invalid, but it would be helpful if the exception was being handled cleaner.
The sentence: $GPGGA,181651.98,LAT,DIR,LON,DIR,0,,,,M,,M,,*43
Looking at the code in the GGA constructor I believe the culprit is:
NumberOfSatellites = int.Parse(message[6], CultureInfo.InvariantCulture);
The sentence for the number of satellites is an empty string, so int.Parse is throwing the exception. As I mentioned I know the issue is a bad sentence being received, but handling a little cleaner would be helpful
Just a note: As I have told you before, love this library. It has saved countless hours having a simple to implement NMEA parser