Improve error message

This commit is contained in:
Peter Butzhammer
2024-02-08 11:02:16 +01:00
parent d1ec075aa7
commit 3145426432

View File

@@ -52,7 +52,7 @@ internal class S7VariableNameParser : IS7VariableNameParser
var match = regex.Match(input);
if (!match.Success)
throw new InvalidS7AddressException($"Invalid S7 address: \"{input}\"", input);
throw new InvalidS7AddressException($"Invalid S7 address \"{input}\". Expect format \"DB<dbNo>.<type><startByte>(.<length>)\".", input);
var operand = (Operand) Enum.Parse(typeof(Operand), match.Groups["operand"].Value, true);