34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 5030d465a8b7b8232b3559d48cf9aba592efefab Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Fri, 19 Jul 2019 11:23:09 +0100
|
|
Subject: [PATCH 10/11] xgettext: Print filename when exceptions are thrown.
|
|
|
|
---
|
|
ocaml-gettext/xgettext.ml | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/ocaml-gettext/xgettext.ml b/ocaml-gettext/xgettext.ml
|
|
index 76232d8..569d40d 100644
|
|
--- a/ocaml-gettext/xgettext.ml
|
|
+++ b/ocaml-gettext/xgettext.ml
|
|
@@ -218,9 +218,13 @@ let ast_iterator =
|
|
|
|
let go fn =
|
|
current_file := fn;
|
|
- let lexbuf = Lexing.from_channel (open_in fn) in
|
|
- let structure = Parse.implementation lexbuf in
|
|
- ast_iterator.Ast_iterator.structure ast_iterator structure
|
|
+ try
|
|
+ let lexbuf = Lexing.from_channel (open_in fn) in
|
|
+ let structure = Parse.implementation lexbuf in
|
|
+ ast_iterator.Ast_iterator.structure ast_iterator structure
|
|
+ with
|
|
+ exn ->
|
|
+ failwith (fn ^ ": " ^ Printexc.to_string exn)
|
|
|
|
let () =
|
|
(* XXX Add -default-textdomain option which sets default_textdomain. *)
|
|
--
|
|
2.22.0
|
|
|