From a37071fa9ab6622eb39acd3c3d82dc8b59a77b4c Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 27 Apr 2021 18:50:28 +0100 Subject: [PATCH] Turn XMP data failure into warning --- cpdf.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cpdf.ml b/cpdf.ml index 76ef6a4..04fee54 100644 --- a/cpdf.ml +++ b/cpdf.ml @@ -3768,9 +3768,13 @@ let xmp_date date = end | _ -> raise Exit end - | _ -> failwith (Printf.sprintf "xmp_date: Malformed date string (no year): %s" date) + | _ -> + Printf.eprintf "xmp_date: Malformed date string (no year): %s\n" date; + make_xmp_date_from_components d end - | _ -> failwith (Printf.sprintf "xmp_date: Malformed date string (no prefix): %s" date) + | _ -> + Printf.eprintf "xmp_date: Malformed date string (no prefix): %s\n" date; + make_xmp_date_from_components d with Exit -> make_xmp_date_from_components d