]> matita.cs.unibo.it Git - helm.git/commitdiff
added helm:exception handling of Http_getter_types.Key_not_found
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 24 Jan 2005 12:57:00 +0000 (12:57 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 24 Jan 2005 12:57:00 +0000 (12:57 +0000)
helm/http_getter/main.ml

index f65e991b7c263fbd7a714e3efbd755684080a3c4..b2a75488a3c8586a73d9ebbd040b7c8e950ec34a 100644 (file)
@@ -336,8 +336,12 @@ let callback (req: Http_types.request) outchan =
         (String.concat "<br />\n" msgs) outchan
   | exc ->
       let msg = "Uncaught exception: " ^ (Printexc.to_string exc) in
-      log_failure msg;
-      return_html_error "Uncaught_exception" msg outchan
+      (match exc with
+      | Http_getter_types.Key_not_found uri ->
+          return_html_error "Key_not_found" msg outchan
+      | _ ->
+          log_failure msg;
+          return_html_error "Uncaught_exception" msg outchan)
 
     (* Main *)