This exception message is useless.
Ivi.Driver.OutOfRangeException: ModularInstruments.NIDmm: The specified argument was out of the range of valid values.
All of the information is provided with "Ivi.Driver.OutOfRangeException" exception type. The message adds nothing else of value. I can clearly see the specified argument was out of the range of valid values. I would really like to know which argument was out of range, the value of argument, and the valid values for that argument.
These useless messages are not limited to the .NET IVI API. It's across all .NET libraries, and they are infuriating. I don't think I can express just how much the rage monster wants out of his cage right now.
Either leave the message off entirely, or (even better) provide USEFUL information in the message. This
Ivi.Driver.OutOfRangeException: ModularInstruments.NIDmm: Parameter "Resolution" of 1234 is out of range.
"Resolution" is expected to be between 1 and 1000.
tells me
1) What went wrong (Parameter Resolution was out of range)
2) Why it went wrong (Resolution needs to be in between 1 and 1000)
3) What to do to fix the problem (Make sure Resolution is between 1 and 1000)