| _ => print ("Slave " ^ node
^ " returned unexpected command\n");
OpenSSL.close bio
- end
+ end
+ handle OpenSSL.OpenSSL s => print ("OpenSSL error: " ^ s ^ "\n")
fun doUser user =
let
(print msgLocal;
print "\n";
Msg.send (bio, MsgOk)))
- handle OpenSSL.OpenSSL _ =>
- print "OpenSSL error\n"
+ handle e as (OpenSSL.OpenSSL s) =>
+ (print ("OpenSSL error: " ^ s ^ "\n");
+ app (fn x => print (x ^ "\n")) (SMLofNJ.exnHistory e);
+ Msg.send (bio, MsgError ("OpenSSL error: " ^ s))
+ handle OpenSSL.OpenSSL _ => ())
| OS.SysErr (s, _) =>
(print "System error: ";
print s;
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 ())