Skip to content

Commit

Permalink
feat(windows): Add ERROR_INVALID_PARAMETER to supported bindings erro…
Browse files Browse the repository at this point in the history
…rs (#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
  • Loading branch information
gozzoo authored and reconbot committed Oct 8, 2017
1 parent dffa9d5 commit 4ff9c67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/serialport_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ff9c67

Please sign in to comment.