From 4ff9c67dc4ac86c49395d01c7f157ba9fb9b81ad Mon Sep 17 00:00:00 2001 From: Evgeni Milev Date: Sun, 8 Oct 2017 18:19:06 +0300 Subject: [PATCH] feat(windows): Add ERROR_INVALID_PARAMETER to supported bindings errors (#1354) Error message according the Microsoft documentation: ERROR_INVALID_PARAMETER = 87 -> The parameter is incorrect. https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx --- src/serialport_win.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/serialport_win.cpp b/src/serialport_win.cpp index d252f5ddb..303363959 100644 --- a/src/serialport_win.cpp +++ b/src/serialport_win.cpp @@ -30,6 +30,9 @@ void ErrorCodeToString(const char* prefix, int errorCode, char *errorStr) { case ERROR_OPERATION_ABORTED: _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Operation aborted", prefix); break; + case ERROR_INVALID_PARAMETER: + _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: The parameter is incorrect", prefix); + break; default: _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Unknown error code %d", prefix, errorCode); break;