Some OpenSSL frobbing
[clinton/domtool2.git] / src / main.sml
index 798ede2..fd4ff63 100644 (file)
@@ -942,8 +942,9 @@ fun service () =
                             (print msgLocal;
                              print "\n";
                              Msg.send (bio, MsgOk)))
-                        handle OpenSSL.OpenSSL _ =>
-                               print "OpenSSL error\n"
+                        handle e as (OpenSSL.OpenSSL s) =>
+                               (print "OpenSSL error\n";
+                                app (fn x => print (x ^ "\n")) (SMLofNJ.exnHistory e))
                              | OS.SysErr (s, _) =>
                                (print "System error: ";
                                 print s;
@@ -1268,8 +1269,9 @@ fun service () =
                in
                    cmdLoop ()
                end
-                   handle OpenSSL.OpenSSL s =>
+                   handle e as (OpenSSL.OpenSSL s) =>
                           (print ("OpenSSL error: " ^ s ^ "\n");
+                           app (fn x => print (x ^ "\n")) (SMLofNJ.exnHistory e);
                            OpenSSL.close bio
                            handle OpenSSL.OpenSSL _ => ();
                            loop ())