diff options
author | Sven Gothel <[email protected]> | 2010-11-07 07:32:24 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-07 07:32:24 +0100 |
commit | b2a3164554bc46ec5293cf85c3420bfe65e55eb8 (patch) | |
tree | b6669bbd2df22e738a2d2d9cd84a8e3db1df6251 /src/java/com/jogamp/gluegen | |
parent | 92379944aa91a78dbebf7fe6537a43fb64f71f9a (diff) |
PCPP: Add file and linenumber in exceptions
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r-- | src/java/com/jogamp/gluegen/pcpp/PCPP.java | 7 |
1 files changed, 4 insertions, 3 deletions
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; |