diff options
author | Sven Gothel <[email protected]> | 2011-09-03 05:36:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-03 05:36:12 +0200 |
commit | cb199004a35ee04d4727f466112adcc65ed7d0d4 (patch) | |
tree | c420ba18e5d0dd3933d38c822b109823f2ffd59e /src | |
parent | cfb9e118e020707842e6b5136b07f5ab149540c1 (diff) |
Fix PCPP/DumpCPP: Avoid NPE ; More descriptive exception in case of non integer opaque in struct
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 2 | ||||
-rw-r--r-- | src/java/com/jogamp/gluegen/pcpp/PCPP.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 18cb5b1..c7c6cc8 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -1390,7 +1390,7 @@ public class JavaEmitter implements GlueEmitter { Class<?> c = javaType.getJavaClass(); if (!isIntegerType(c)) { // FIXME - throw new RuntimeException("Can't yet handle opaque definitions of structs' fields to non-integer types (byte, short, int, long, etc.)"); + throw new RuntimeException("Can't yet handle opaque definitions of structs' fields to non-integer types (byte, short, int, long, etc.): type: "+fieldType+", javaType "+javaType+", javaClass "+c); } switch ((int) fieldType.getSize(curMachDesc)) { case 1: return "byte"; diff --git a/src/java/com/jogamp/gluegen/pcpp/PCPP.java b/src/java/com/jogamp/gluegen/pcpp/PCPP.java index 45a92df..59807b2 100644 --- a/src/java/com/jogamp/gluegen/pcpp/PCPP.java +++ b/src/java/com/jogamp/gluegen/pcpp/PCPP.java @@ -319,11 +319,11 @@ public class PCPP { } private String filename() { - return state.filename(); + return (null != state) ? state.filename() : null; } private int lineNumber() { - return state.lineNumber(); + return (null != state) ? state.lineNumber() : -1; } ///////////// |