Nasal: improve message for non-object member access
Based on some discussion on this ticket: https://sourceforge.net/p/flightgear/codetickets/2186/ Make this message slightly clearer.
This commit is contained in:
parent
8d6e543cc2
commit
57b0f70a55
@ -503,7 +503,7 @@ static void setMember(naContext ctx, naRef obj, naRef fld, naRef value)
|
||||
return;
|
||||
}
|
||||
|
||||
if(!IS_HASH(obj)) ERR(ctx, "non-objects have no members");
|
||||
if(!IS_HASH(obj)) naRuntimeError(ctx, "non-object does not have member: %s", naStr_data(fld));
|
||||
naHash_set(obj, fld, value);
|
||||
ctx->opTop -= 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user