Skip to content

Commit

Permalink
Adjust error message for zero size CStruct, jnthn++.
Browse files Browse the repository at this point in the history
  • Loading branch information
peschwa committed Oct 1, 2016
1 parent f4e333a commit 726735e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/CStruct.java
Expand Up @@ -112,7 +112,8 @@ private void generateStructClass(ThreadContext tc, STable st, List<AttrInfo> fie
int attributes = fields.size();

if (attributes == 0) {
ExceptionHandling.dieInternal(tc, "Class " + Ops.typeName(st.WHAT, tc) + " has repr CStruct but no fields");
ExceptionHandling.dieInternal(tc,
"Class " + Ops.typeName(st.WHAT, tc) + " has no attributes, which is illegal with the CStruct representation.");
}

// public $className extends com.sun.jna.Structure implements com.sun.jna.Structure.ByReference { ... }
Expand Down

0 comments on commit 726735e

Please sign in to comment.