From 57b0f70a5565ca2c206805d7947041116fcf34f2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 28 Apr 2020 09:34:30 +0100 Subject: [PATCH] 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. --- simgear/nasal/code.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/nasal/code.c b/simgear/nasal/code.c index f724c1ba..007d4128 100644 --- a/simgear/nasal/code.c +++ b/simgear/nasal/code.c @@ -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; }