diff options
author | Mathieu Féry <[email protected]> | 2023-06-15 18:31:34 +0200 |
---|---|---|
committer | Mathieu Féry <[email protected]> | 2023-06-16 10:52:08 +0200 |
commit | c0a5b3fcc4a2d7f5c30f95e9b387c8a2e02b4f6f (patch) | |
tree | 9361e5ffbef5c5ff81064e283d13ed8d66a63601 /src/java/com/jogamp/gluegen | |
parent | 88309192b450e09ba16e9d72adac178c4ce47dc3 (diff) |
feat(translationUnit): Improve logs in case of failure inside translationUnit
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r-- | src/java/com/jogamp/gluegen/GlueGen.java | 10 |
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 6dee6f0..b445afa 100644 --- a/src/java/com/jogamp/gluegen/GlueGen.java +++ b/src/java/com/jogamp/gluegen/GlueGen.java @@ -167,7 +167,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); } |