diff --git a/cpdferror.ml b/cpdferror.ml index 2329e61..e21cf2c 100644 --- a/cpdferror.ml +++ b/cpdferror.ml @@ -1,9 +1,6 @@ -(** Two exceptions recommended for use with the library, though currently not -raised by any function in this module. Cpdfcommand uses them extensively. *) +(** Two exceptions recommended for use with the library. *) exception SoftError of string exception HardError of string let error s = raise (SoftError s) - - diff --git a/cpdfua.ml b/cpdfua.ml index 9b2e923..aa9cfcb 100644 --- a/cpdfua.ml +++ b/cpdfua.ml @@ -363,7 +363,7 @@ let replace_struct_tree pdf (json : Cpdfyojson.Safe.t) = | Pdf.Indirect i -> begin match lookup i negobjnummap with | Some x -> Pdf.Indirect x - | None -> error "rewrite_indirects" + | None -> Pdf.Indirect i end | Pdf.Dictionary d -> Pdf.recurse_dict (rewrite_indirects negobjnummap) d | Pdf.Array a -> Pdf.recurse_array (rewrite_indirects negobjnummap) a