From b42dcf03a28e99d0f024a3bf45ca78198debb46a Mon Sep 17 00:00:00 2001 From: Edward Wright Date: Tue, 4 Jun 2019 22:01:47 -0400 Subject: [PATCH] added port name to exception/error messages --- SimplySerial/SimplySerial.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SimplySerial/SimplySerial.cs b/SimplySerial/SimplySerial.cs index b43f555..10a406a 100644 --- a/SimplySerial/SimplySerial.cs +++ b/SimplySerial/SimplySerial.cs @@ -43,11 +43,11 @@ namespace SimplySerial } catch (System.UnauthorizedAccessException uae) { - ExitProgram((uae.GetType() + " occurred while attempting to open the serial port. Is this serial port already in use in another application?"), exitCode: -1); + ExitProgram((uae.GetType() + " occurred while attempting to open " + port + ". Is this port already in use in another application?"), exitCode: -1); } catch (Exception e) { - ExitProgram((e.GetType() + " occurred while attempting to open the serial port " + port + "."), exitCode: -1); + ExitProgram((e.GetType() + " occurred while attempting to open " + port + "."), exitCode: -1); } // set up keyboard input for relay to serial port @@ -114,7 +114,7 @@ namespace SimplySerial } catch (Exception e) { - ExitProgram((e.GetType() + " occurred while attempting to read/write to/from the serial port."), exitCode: -1); + ExitProgram((e.GetType() + " occurred while attempting to read/write to/from " + port + "."), exitCode: -1); } }