From: Adam Chlipala Date: Mon, 9 Apr 2007 22:07:25 +0000 (+0000) Subject: Add last-resort exception handlers in server code X-Git-Tag: release_2010-11-19~242 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/809b0173b548f0c182b53a21ab8865f947a11f9c Add last-resort exception handlers in server code --- diff --git a/src/main.sml b/src/main.sml index 0be3112..84e7fe3 100644 --- a/src/main.sml +++ b/src/main.sml @@ -847,6 +847,7 @@ fun regenerate context = handle IO.Io _ => () | OS.SysErr (s, _) => print ("System error processing user " ^ user ^ ": " ^ s ^ "\n") | ErrorMsg.Error => print ("User " ^ user ^ " had a compilation error.\n") + | _ => print "Unknown exception during regeneration!\n" in app contactNode Config.nodeIps; Env.pre (); @@ -1252,6 +1253,11 @@ fun service () = OpenSSL.close bio handle OpenSSL.OpenSSL _ => (); loop ()) + | _ => + (print "Unknown exception in main loop!\n"; + OpenSSL.close bio + handle OpenSSL.OpenSSL _ => (); + loop ()) in print ("Domtool dispatcher starting up at " ^ now () ^ "\n"); print "Listening for connections....\n";