From 4d5a5953c4ef826e1a0628ceed1a892f3e1aa104 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 2 Dec 2002 15:27:33 +0000 Subject: [PATCH] - bugfix: wrap Not_found exception with Stylesheet_not_found exception when trying to apply an unloaded stylesheet --- helm/uwobo/src/ocaml/uwobo_styles.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/uwobo/src/ocaml/uwobo_styles.ml b/helm/uwobo/src/ocaml/uwobo_styles.ml index b40298780..218da1786 100644 --- a/helm/uwobo/src/ocaml/uwobo_styles.ml +++ b/helm/uwobo/src/ocaml/uwobo_styles.ml @@ -50,7 +50,9 @@ class styles = List.fold_left (fun collected_styles key -> let (key, stylesheet) = - List.find (fun (k, _) -> k = key) stylesheets + try + List.find (fun (k, _) -> k = key) stylesheets + with Not_found -> raise (Stylesheet_not_found key) in (key, Gdome_xslt.processStylesheet stylesheet)::collected_styles) [] -- 2.39.2