aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-18 19:37:40 +0200
committerSven Gothel <[email protected]>2023-06-18 19:37:40 +0200
commita7e6563f43a8c2415773edc39c2c8d5840c4a3dd (patch)
tree56e33e4c07405dc6961f7350360472069aaefcfc /src/java/com/jogamp
parent2868ccfdb601711e12623df3c11e58fe608b9c80 (diff)
parentc0a5b3fcc4a2d7f5c30f95e9b387c8a2e02b4f6f (diff)
Merge remote-tracking branch 'Mathieu_Fery/feature/improve_logs_inside_translation_unit'
Diffstat (limited to 'src/java/com/jogamp')
-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);
}