Exiting gracefully from (H)GLUT?

Hello. I have recently started using the HOpenGL (version 1.01) under Linux running ghc 5.02.1 and have a question. How do I exit my application gracefully (apart from closing the window). In your examples you use
exitWith ExitSuccess
That however causes a: TestGLUT: fatal error: GLUT_CBWindow_d7Tf: uncaught exception Similar error appear in my application. How do I get around this? It does not appear to help to do a destroyWindow before exiting. Any ideas? Thanks, Calle

This is happening because exitWith now raises an exception, rather than only
exiting. You'll need to handle this exception properly or wait for some
implementation news on GHC... Check for previous discussion about this topic
in the HOpenGL mailing list archives.
-- Andre
----- Original Message -----
From: Calle Lejdfors
Hello.
I have recently started using the HOpenGL (version 1.01) under Linux running ghc 5.02.1 and have a question. How do I exit my application gracefully (apart from closing the window). In your examples you use
exitWith ExitSuccess
That however causes a:
TestGLUT: fatal error: GLUT_CBWindow_d7Tf: uncaught exception
Similar error appear in my application. How do I get around this? It does not appear to help to do a destroyWindow before exiting.
Any ideas?
Thanks, Calle _______________________________________________ HOpenGL mailing list HOpenGL@haskell.org http://www.haskell.org/mailman/listinfo/hopengl
participants (2)
-
Andre W B Furtado
-
Calle Lejdfors