tuned messages;
authorwenzelm
Fri, 14 Dec 2018 14:07:51 +0100
changeset 69472 d016ef70c069
parent 69471 e7fd8c6d183a
child 69473 f71598c11fae
tuned messages;
src/Tools/Haskell/Haskell.thy
--- a/src/Tools/Haskell/Haskell.thy	Fri Dec 14 11:47:53 2018 +0100
+++ b/src/Tools/Haskell/Haskell.thy	Fri Dec 14 14:07:51 2018 +0100
@@ -1633,6 +1633,7 @@
 import Network.Socket (Socket)
 import qualified Network.Socket as Socket
 import qualified Control.Concurrent as Concurrent
+import qualified System.IO as IO
 
 import Isabelle.Library
 import qualified Isabelle.UUID as UUID
@@ -1681,7 +1682,11 @@
         (do
           line <- Byte_Message.read_line connection
           when (line == Just password) $ handle connection)
-        (\_ -> Socket.close connection)
+        (\final -> do
+          Socket.close connection
+          case final of
+            Left exn -> IO.hPutStrLn IO.stderr $ Exception.displayException exn
+            Right () -> return ())
       return ()
 \<close>