Skip to content

Commit 4ff9c67

Browse files
gozzooreconbot
authored andcommitted
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
1 parent dffa9d5 commit 4ff9c67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/serialport_win.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ void ErrorCodeToString(const char* prefix, int errorCode, char *errorStr) {
3030
case ERROR_OPERATION_ABORTED:
3131
_snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Operation aborted", prefix);
3232
break;
33+
case ERROR_INVALID_PARAMETER:
34+
_snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: The parameter is incorrect", prefix);
35+
break;
3336
default:
3437
_snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Unknown error code %d", prefix, errorCode);
3538
break;

0 commit comments

Comments
 (0)