From b95b71e9aaef970b56087423ba5a64e631b849b0 Mon Sep 17 00:00:00 2001 From: Serge Camille Date: Wed, 16 Sep 2020 20:26:53 +0200 Subject: [PATCH] Remove unnecessary string interpolation in ValidateResponseCode --- S7.Net/PLC.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/S7.Net/PLC.cs b/S7.Net/PLC.cs index 972c615..d95973d 100644 --- a/S7.Net/PLC.cs +++ b/S7.Net/PLC.cs @@ -245,17 +245,17 @@ namespace S7.Net switch (statusCode) { case ReadWriteErrorCode.ObjectDoesNotExist: - throw new Exception($"Received error from PLC: Object does not exist."); + throw new Exception("Received error from PLC: Object does not exist."); case ReadWriteErrorCode.DataTypeInconsistent: - throw new Exception($"Received error from PLC: Data type inconsistent."); + throw new Exception("Received error from PLC: Data type inconsistent."); case ReadWriteErrorCode.DataTypeNotSupported: - throw new Exception($"Received error from PLC: Data type not supported."); + throw new Exception("Received error from PLC: Data type not supported."); case ReadWriteErrorCode.AccessingObjectNotAllowed: - throw new Exception($"Received error from PLC: Accessing object not allowed."); + throw new Exception("Received error from PLC: Accessing object not allowed."); case ReadWriteErrorCode.AddressOutOfRange: - throw new Exception($"Received error from PLC: Address out of range."); + throw new Exception("Received error from PLC: Address out of range."); case ReadWriteErrorCode.HardwareFault: - throw new Exception($"Received error from PLC: Hardware fault."); + throw new Exception("Received error from PLC: Hardware fault."); case ReadWriteErrorCode.Success: break; default: