HCoop
/
hcoop
/
domtool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
800b3e1
)
Slave catches all exceptions, to avoid dying
author
Adam Chlipala
<adamc@hcoop.net>
Sun, 9 Dec 2007 13:25:40 +0000
(13:25 +0000)
committer
Adam Chlipala
<adamc@hcoop.net>
Sun, 9 Dec 2007 13:25:40 +0000
(13:25 +0000)
src/main.sml
patch
|
blob
|
blame
|
history
diff --git
a/src/main.sml
b/src/main.sml
index
ba60764
..
feaab16
100644
(file)
--- a/
src/main.sml
+++ b/
src/main.sml
@@
-1636,7
+1636,7
@@
fun slave () =
| _ => (OpenSSL.close bio;
loop ())
end handle OpenSSL.OpenSSL s =>
| _ => (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 ())
OpenSSL.close bio
handle OpenSSL.OpenSSL _ => ();
loop ())
@@
-1646,6
+1646,17
@@
fun slave () =
OpenSSL.close bio
handle OpenSSL.OpenSSL _ => ();
loop ())
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
in
loop ();
OpenSSL.shutdown sock