aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/jogamp/gluegen/GlueGen.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java
index e0c42c7..d09e5d8 100644
--- a/src/java/com/jogamp/gluegen/GlueGen.java
+++ b/src/java/com/jogamp/gluegen/GlueGen.java
@@ -172,7 +172,15 @@ public class GlueGen implements GlueEmitterControls {
try {
parser.translationUnit();
} catch (final RecognitionException e) {
- throw new RuntimeException("Fatal IO error", e);
+ throw new RuntimeException(String.format(
+ "Fatal error during translation (Localisation : %s:%s:%s)",
+ e.getFilename(), e.getLine(), e.getColumn()
+ ), e);
+ } catch (final TokenStreamRecognitionException e) {
+ throw new RuntimeException(String.format(
+ "Fatal error during translation (Localisation : %s:%s:%s)",
+ e.recog.getFilename(), e.recog.getLine(), e.recog.getColumn()
+ ), e);
} catch (final TokenStreamException e) {
throw new RuntimeException("Fatal IO error", e);
}