From 145842e49e067265b2f779af1ddf98cd76c3a0a3 Mon Sep 17 00:00:00 2001 From: Michele Cattafesta Date: Mon, 2 Feb 2015 22:44:19 +0100 Subject: [PATCH] Added exception message on general communication exception. Signed-off-by: Michele Cattafesta --- S7.Net/PLC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/S7.Net/PLC.cs b/S7.Net/PLC.cs index b6e6dca..c1212aa 100644 --- a/S7.Net/PLC.cs +++ b/S7.Net/PLC.cs @@ -219,10 +219,10 @@ namespace S7.Net LastErrorString = socketException.Message; return null; } - catch + catch(Exception exc) { LastErrorCode = ErrorCode.WriteData; - LastErrorString = ""; + LastErrorString = exc.Message; return null; } }