diff options
| author | LLLL Colonq <llll@colonq> | 2025-06-01 20:26:31 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-06-01 20:26:31 -0400 |
| commit | 0dbae80f019d0d84da269286da2cf9bfab7c6141 (patch) | |
| tree | 873800322df59ee8e1897b0071292349b02aec84 /fig-bus/src | |
| parent | 083a22f0d8940c7e0a198c473b8605cbc9611d3e (diff) | |
fig-bus: Clarify error message
Diffstat (limited to 'fig-bus/src')
| -rw-r--r-- | fig-bus/src/Fig/Bus/Binary/Client.hs | 2 | ||||
| -rw-r--r-- | fig-bus/src/Fig/Bus/Binary/Utils.hs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/fig-bus/src/Fig/Bus/Binary/Client.hs b/fig-bus/src/Fig/Bus/Binary/Client.hs index a2e601f..e1226d8 100644 --- a/fig-bus/src/Fig/Bus/Binary/Client.hs +++ b/fig-bus/src/Fig/Bus/Binary/Client.hs @@ -45,7 +45,7 @@ busClient loc@(host, port) onConn onData onQuit = catchFailure . client loc $ pu forever do (,) <$> readLengthPrefixed h <*> readLengthPrefixed h >>= \case (Just ev, Just d) -> liftIO $ onData cmds ev d - _else -> throwM . FigBusClientException $ "Server sent malformed data" + _else -> throwM . FigBusClientException $ "Connection to bus closed" , liftIO onQuit ) where diff --git a/fig-bus/src/Fig/Bus/Binary/Utils.hs b/fig-bus/src/Fig/Bus/Binary/Utils.hs index 734c7c9..2fa714d 100644 --- a/fig-bus/src/Fig/Bus/Binary/Utils.hs +++ b/fig-bus/src/Fig/Bus/Binary/Utils.hs @@ -23,7 +23,6 @@ readLengthPrefixed h = do x <- hGet h len pure $ Just x - readEvent :: Handle -> IO (Maybe EventType) readEvent h = do mb <- readLengthPrefixed h |
