]> matita.cs.unibo.it Git - helm.git/commitdiff
- bugfix: wrap Not_found exception with Stylesheet_not_found exception
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 2 Dec 2002 15:27:33 +0000 (15:27 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 2 Dec 2002 15:27:33 +0000 (15:27 +0000)
  when trying to apply an unloaded stylesheet

helm/uwobo/src/ocaml/uwobo_styles.ml

index b402987800bb6c51940197f1aa713c70ec4af015..218da17868260b195946d676ca9c9051ae8c6f76 100644 (file)
@@ -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)
             []