[Pkg-ocaml-maint-commits] [SCM] ocaml-batteries packaging branch, debian/missing-doc, updated. upstream/0.20081011-729-gca1004d
Stefano Zacchiroli
zack at upsilon.cc
Wed Apr 1 15:07:03 UTC 2009
The following commit has been merged in the debian/missing-doc branch:
commit ca1004d73e95a2a457ac4e26be7931d83ec1e49e
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date: Wed Apr 1 16:39:38 2009 +0200
return a dummy result (as expected) upon missing help failure
diff --git a/src/batteries_toolchain/batteries_help.ml b/src/batteries_toolchain/batteries_help.ml
index 4e2daf4..08aa133 100644
--- a/src/batteries_toolchain/batteries_help.ml
+++ b/src/batteries_toolchain/batteries_help.ml
@@ -108,11 +108,6 @@ let append_to_table table k v =
in
RefList.push found v
-
-(**
- {6 Help messages}
-*)
-
let debian_doc_hint_warn =
"Warning: help will not be available, because Batteries documentation\n"
^ "is not installed.\n"
@@ -219,16 +214,17 @@ let get_table =
Hashtbl.add tables kind result;
result
- with
- | Sys_error msg when String.ends_with msg "No such file or directory" ->
- Printf.eprintf "%s%s%!" debian_doc_hint_warn debian_doc_hint_inst
- | e ->
- Printf.eprintf
- "While initializing the on-line help, error in root doc file %S\n%s\n%!" root_file
- (Printexc.to_string e);
- let result = {suggestions = Hashtbl.create 0; completions = Hashtbl.create 0} in
- Hashtbl.add tables kind result;
- result
+ with e ->
+ let result = {suggestions = Hashtbl.create 0; completions = Hashtbl.create 0} in
+ Hashtbl.add tables kind result;
+ (match e with
+ | Sys_error msg when String.ends_with msg "No such file or directory" ->
+ Printf.eprintf "%s%s%!" debian_doc_hint_warn debian_doc_hint_inst
+ | e ->
+ Printf.eprintf
+ "While initializing the on-line help, error in root doc file %S\n%s\n%!" root_file
+ (Printexc.to_string e));
+ result
--
ocaml-batteries packaging
More information about the Pkg-ocaml-maint-commits
mailing list