X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/76405e1e2e13a95cdb4accd6af014ee21eed2c57..cd04086681583dd3fcc95b6e12ba312054dc590e:/src/main.sml diff --git a/src/main.sml b/src/main.sml index d769a61..feaab16 100644 --- a/src/main.sml +++ b/src/main.sml @@ -176,7 +176,7 @@ fun eval fname = raise ErrorMsg.Error else Eval.exec (Defaults.eInit ()) body' - | NONE => raise ErrorMsg.Error + | NONE => () fun eval' fname = case reduce fname of @@ -185,7 +185,7 @@ fun eval' fname = raise ErrorMsg.Error else ignore (Eval.exec' (Defaults.eInit ()) body') - | NONE => raise ErrorMsg.Error + | NONE => () val dispatcher = Config.dispatcher ^ ":" ^ Int.toString Config.dispatcherPort @@ -288,7 +288,7 @@ fun requestDir dname = val (_, files) = Order.order (SOME b) files val _ = if !ErrorMsg.anyErrors then - raise ErrorMsg.Error + (print "J\n";raise ErrorMsg.Error) else () @@ -1636,7 +1636,7 @@ fun slave () = | _ => (OpenSSL.close bio; loop ()) end handle OpenSSL.OpenSSL s => - (print ("OpenSSL error: "^ s ^ "\n"); + (print ("OpenSSL error: " ^ s ^ "\n"); OpenSSL.close bio handle OpenSSL.OpenSSL _ => (); loop ()) @@ -1646,6 +1646,17 @@ fun slave () = OpenSSL.close bio handle OpenSSL.OpenSSL _ => (); loop ()) + | IO.Io {function, name, ...} => + (print ("IO error: " ^ function ^ ": " ^ name ^ "\n"); + OpenSSL.close bio + handle OpenSSL.OpenSSL _ => (); + loop ()) + | e => + (app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory e); + print "Uncaught exception!\n"; + OpenSSL.close bio + handle OpenSSL.OpenSSL _ => (); + loop ()) in loop (); OpenSSL.shutdown sock