Skip to content

Kill the printing of "Handling" to stderr#30

Merged
alt-romes merged 1 commit intomasterfrom
wip/romes/handling
Apr 16, 2026
Merged

Kill the printing of "Handling" to stderr#30
alt-romes merged 1 commit intomasterfrom
wip/romes/handling

Conversation

@alt-romes
Copy link
Copy Markdown
Collaborator

@alt-romes alt-romes commented Apr 15, 2026

    The `"Handling " <> show e` message would get printed to the stderr of
    the dap server. This resulted in thinking something was wrong in
    inumerous occasions, seeing messages such as:

    [stderr] DAP.Se
    [stderr] rver/Handling:

    [stderr] ghc-internal:GHC.Internal.IO.Exception
    [stderr] .IOException:

    <socket: 13>: Da
    [stderr] ta.ByteString.hGetLine: end of file

    IPE backtrac
    [stderr] e:

    [stderr]   DAP.Server
    [stderr] .getHeaderHandle (src/DAP/Server.hs:(217,1)-(220,32))
    HasCallStack backtrace:
      ioException, called at
    [stderr]  libraries/ghc-internal/src/GHC/Internal/IO/H
    [stderr] andle/Internals.hs:353:11 in ghc-
    [stderr] internal:GHC.Internal.IO.Handle.Interna
    [stderr] ls

    (I had slightly tweaked the message to investigate what was going wrong)

    When, in reality, nothing was wrong. This was an EOF exception
    indicating the client had closed the connection.

    However, when looking at the logs, the "Handling" was misleading (and
    not easily correlated with the "Client has ended its connection below".

    All in all, I don't think we should print the "Handling" at all. If an
    exception is handled, it is handled. If it is not, then it gets logged
    to the appropriate logger as "Unknown Exception".

@alt-romes alt-romes force-pushed the wip/romes/handling branch 2 times, most recently from 7bf75e9 to ae296b3 Compare April 15, 2026 16:58
@alt-romes alt-romes changed the title Display client thread exception with displayExceptionWithInfo Kill the printing of "Handling" to stderr Apr 15, 2026
@alt-romes
Copy link
Copy Markdown
Collaborator Author

@dmjio would you like to take a look?

This has caused me so much confusion! Only now I properly realized that this gets printed always!!
We should kill it.

@dmjio
Copy link
Copy Markdown
Contributor

dmjio commented Apr 15, 2026

Yea that looks problematic. Killing it is fine with me.

The `"Handling " <> show e` message would get printed to the stderr of
the dap server. This resulted in thinking something was wrong in
inumerous occasions, seeing messages such as:

```
[stderr] DAP.Se
[stderr] rver/Handling:

[stderr] ghc-internal:GHC.Internal.IO.Exception
[stderr] .IOException:

<socket: 13>: Da
[stderr] ta.ByteString.hGetLine: end of file

IPE backtrac
[stderr] e:

[stderr]   DAP.Server
[stderr] .getHeaderHandle (src/DAP/Server.hs:(217,1)-(220,32))
HasCallStack backtrace:
  ioException, called at
[stderr]  libraries/ghc-internal/src/GHC/Internal/IO/H
[stderr] andle/Internals.hs:353:11 in ghc-
[stderr] internal:GHC.Internal.IO.Handle.Interna
[stderr] ls
```

(I had slightly tweaked the message to investigate what was going wrong)

When, in reality, nothing was wrong. This was an EOF exception
indicating the client had closed the connection.

However, when looking at the logs, the "Handling" was misleading (and
not easily correlated with the "Client has ended its connection below".

All in all, I don't think we should print the "Handling" at all. If an
exception is handled, it is handled. If it is not, then it gets logged
to the appropriate logger as "Unknown Exception".
@alt-romes alt-romes force-pushed the wip/romes/handling branch from ae296b3 to 02e5f7c Compare April 15, 2026 17:24
@alt-romes alt-romes merged commit 27f6b22 into master Apr 16, 2026
1 check passed
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.

2 participants