From b2a3164554bc46ec5293cf85c3420bfe65e55eb8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 7 Nov 2010 07:32:24 +0100 Subject: PCPP: Add file and linenumber in exceptions --- src/java/com/jogamp/gluegen/pcpp/PCPP.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/java') diff --git a/src/java/com/jogamp/gluegen/pcpp/PCPP.java b/src/java/com/jogamp/gluegen/pcpp/PCPP.java index 966c860..8ab1d28 100644 --- a/src/java/com/jogamp/gluegen/pcpp/PCPP.java +++ b/src/java/com/jogamp/gluegen/pcpp/PCPP.java @@ -285,7 +285,7 @@ public class PCPP { return state.curWord(); } if (t == StreamTokenizer.TT_EOL) { - throw new RuntimeException("Should not be converting EOL characters to strings"); + throw new RuntimeException("Should not be converting EOL characters to strings at file " + filename() + ", line " + lineNumber()); } char c = (char) t; if (c == '"' || c == '\'') { @@ -614,7 +614,8 @@ public class PCPP { // This is probably something the user should investigate. throw new RuntimeException("Cannot redefine symbol \"" + name + " from \"" + defineMap.get(name) + "\" to non-constant " + - " definition \"" + val.toString() + "\""); + " definition \"" + val.toString() + "\"" + + " at file \"" + filename() + ", line " + lineNumber() ); } defineMap.put(name, val.toString()); nonConstantDefines.add(name); @@ -1025,7 +1026,7 @@ public class PCPP { private void popEnableBit() { if (enabledBits.isEmpty()) { - throw new RuntimeException("mismatched #ifdef/endif pairs (line " + lineNumber() + " file " + filename() + ")"); + throw new RuntimeException("mismatched #ifdef/endif pairs at file " + filename() + ", line " + lineNumber()); } enabledBits.remove(enabledBits.size() - 1); --debugPrintIndentLevel; -- cgit v1.2.3