diff options
author | Sven Gothel <[email protected]> | 2023-06-18 19:36:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-18 19:36:49 +0200 |
commit | 2868ccfdb601711e12623df3c11e58fe608b9c80 (patch) | |
tree | 4e2dcef5f631b4135349c379efe7ee5787d8e601 | |
parent | fd8ebf543ecc16233c0027c5a38701c11be548c7 (diff) | |
parent | e1d5b49ecd9b180b6a80ad4d0ab63e0807682621 (diff) |
Merge remote-tracking branch 'Mathieu_Fery/feature/improve_compound_type_errors'
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/types/CompoundType.java | 8 |
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; } |