aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-18 19:36:49 +0200
committerSven Gothel <[email protected]>2023-06-18 19:36:49 +0200
commit2868ccfdb601711e12623df3c11e58fe608b9c80 (patch)
tree4e2dcef5f631b4135349c379efe7ee5787d8e601
parentfd8ebf543ecc16233c0027c5a38701c11be548c7 (diff)
parente1d5b49ecd9b180b6a80ad4d0ab63e0807682621 (diff)
Merge remote-tracking branch 'Mathieu_Fery/feature/improve_compound_type_errors'
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/CompoundType.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
index fea2446..0620104 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/CompoundType.java
@@ -192,7 +192,9 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable
/** Adds a field to this type. */
public void addField(final Field f) {
if (bodyParsed) {
- throw new IllegalStateException("Body of this CompoundType has been already closed");
+ throw new IllegalStateException(String.format(
+ "Body of this CompoundType (%s) has been already closed (Field supplied %s)", this, f
+ ));
}
if (fields == null) {
fields = new ArrayList<Field>();
@@ -208,7 +210,9 @@ public abstract class CompoundType extends MemoryLayoutType implements Cloneable
*/
public void setBodyParsed() throws IllegalStateException {
if (bodyParsed) {
- throw new IllegalStateException("Body of this CompoundType has been already closed");
+ throw new IllegalStateException(String.format(
+ "Body of this CompoundType (%s) has been already closed", this
+ ));
}
bodyParsed = true;
}