Skip to content

Raise a SetFileCompletionNotificationModes failure with its reason - #648

Merged
kazu-yamamoto merged 1 commit into
haskell:masterfrom
kazu-yamamoto:associate-error
Nov 15, 2026
Merged

kazu-yamamoto merged 1 commit into
haskell:masterfrom
kazu-yamamoto:associate-error

Conversation

@kazu-yamamoto

Copy link
Copy Markdown
Collaborator

Left over from #639: when SetFileCompletionNotificationModes failed while associating a socket with the I/O manager, associateSocket raised userError "associateSocket: SetFileCompletionNotificationModes failed", without the error code.

  • It is a Win32 error, not a Winsock one, so throwSocketErrorCode (which looks codes up in the Winsock table) would describe it as an unknown WinSock error. failIfFalse_ from Win32, already a dependency on Windows, raises it with the system's message for the code.
  • The location now says whether Network.Socket.socket or Network.Socket.accept was preparing the socket, for this error and for the one from making it non-blocking.

The failure is not expected for ordinary sockets; it is the error a socket behind a non-IFS LSP, which is not supported (#642), would most likely meet, so its reason is worth having. It cannot be provoked in a test.

Tested on Windows 11 with GHC 9.12.4.20260713: 124 examples, 0 failures, no new warnings.

🤖 Generated with Claude Code

It was a userError without the code.  It is a Win32 error, not a Winsock
one, so failIfFalse_ raises it with its message; the location says
whether socket or accept was preparing the socket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kazu-yamamoto
kazu-yamamoto merged commit b029405 into haskell:master Nov 15, 2026
9 checks passed
@kazu-yamamoto
kazu-yamamoto deleted the associate-error branch November 15, 2026 04:02
kazu-yamamoto added a commit that referenced this pull request Nov 15, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant