do not handle arbitrary exceptions;
authorwenzelm
Tue, 26 Oct 2010 11:31:22 +0200
changeset 40152 51e026049e4d
parent 40151 752a26dce4be
child 40153 b6fe3b189725
do not handle arbitrary exceptions;
src/Tools/WWW_Find/scgi_req.ML
--- a/src/Tools/WWW_Find/scgi_req.ML	Tue Oct 26 11:23:27 2010 +0200
+++ b/src/Tools/WWW_Find/scgi_req.ML	Tue Oct 26 11:31:22 2010 +0200
@@ -106,8 +106,9 @@
        | SOME wv => Byte.unpackStringVec wv);
 
     val content_length =
-      (the o Int.fromString o field) "CONTENT_LENGTH"
-      handle _ => raise InvalidReq "Bad CONTENT_LENGTH";
+      (case Int.fromString (field "CONTENT_LENGTH") of
+        SOME n => n
+      | NONE => raise InvalidReq "Bad CONTENT_LENGTH");
 
     val req = Req {
         path_info = field "PATH_INFO",