Skip to content

Commit

Permalink
Improve exception messages (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Sep 22, 2022
1 parent 27b2317 commit 7ac1113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nanoFramework.GiantGecko.Adc/AdcChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public override int ReadValue()
// can't read a channel when performing continuous conversion
if (_adcController._continuousSamplingStarted)
{
throw new InvalidOperationException();
throw new InvalidOperationException("Continuous conversion operation in progress.");
}

// set average count to 1 for single sample
Expand All @@ -85,7 +85,7 @@ public override int ReadValueAveraged(int count)
// can't read a channel when performing continuous conversion
if (_adcController._continuousSamplingStarted)
{
throw new InvalidOperationException();
throw new InvalidOperationException("Continuous conversion operation in progress.");
}

return NativeReadValue(count);
Expand Down

0 comments on commit 7ac1113

Please sign in to comment.