Skip to content

Commit 1e8d590

Browse files
committed
Indicating which file caused exception.
1 parent 435c9d9 commit 1e8d590

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

i18n-gettext-tools/src/main/java/net/jhorstmann/i18n/tools/xgettext/MessageExtractorException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ public MessageExtractorException(Throwable cause) {
66
super(cause);
77
}
88

9+
public MessageExtractorException(String message, Throwable cause) {
10+
super(message, cause);
11+
}
12+
913
}

i18n-xgettext-web/src/main/java/net/jhorstmann/i18n/xgettext/web/WebMessageExtractor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ public final void extractMessages(File file) throws IOException, MessageExtracto
9797
InputSource input = new InputSource(in);
9898
input.setSystemId(systemId);
9999
extractMessages(input);
100+
} catch (MessageExtractorException e) {
101+
throw new MessageExtractorException(file.getAbsolutePath(), e);
100102
} finally {
101103
in.close();
102104
}

0 commit comments

Comments
 (0)