Closed lmartorella closed 7 months ago
Added another case of "ArgumentOutOfRangeException" raise in case the modbus error received is custom and not one of the predefined ones. For uniformity of API, it should be correct to raise the same exception type "ModbusException" also for such cases, with a generic error message.
Thanks for your contribution and sorry for being so late
Fixed
ArgumentOutOfRangeException
exception in case of malformed messages, shorter than 2 bytes. Since the check for malformed messages is already in place, with this fix we can avoid unexpected exceptions. Thx, L!