2

I am using Threepenny (hello Heinrich!) to construct an image database GUI.

As part of the diagnostic and development phase, whenever I attempt to write diagnostic files to /static (or anywhere else), Threepenny seems to throw a wobbly (only showing "an exception escaped to toplevel: ServerAppDone". When trying to write to stderr/stdout via print or putStrLn etc, nothing seems to come out onto the Threepenny command window launch screen's text.

Am I missing something here, or does the way Threepenny operate prevent haskell output?

  • For "out of band" writing to stderr I suggest you take a look at `Debug.Trace`... – sclv Mar 26 '16 at 07:28
  • 3
    In the example projects that come with threepenny-gui Both `putStrLn` and `hPutStrLn stderr` print to the console. Can you give some minimal code that reproduces the error? – zakyggaps Mar 26 '16 at 10:40
  • I'm not entirely sure, but I would guess that exceptions are re-raised as `ServerAppDone` exceptions. So, if the code you wrote throws an exception, e.g. `FileNotFound`, then you won't see this message, instead, you will see a rather non-descriptive `ServerAppDone` exception. Chances are that your code doesn't print anything because it has exiting before that due to an exception! – Heinrich Apfelmus Mar 28 '16 at 08:23

0 Answers0