From: Thomas Geymayer Date: Fri, 20 Jun 2014 22:21:36 +0000 (+0200) Subject: Nasal: better error message for non-numeric string. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f2f1b36df93b10a0d47c20ad19959fb261c18f48;p=simgear.git Nasal: better error message for non-numeric string. --- diff --git a/simgear/nasal/code.c b/simgear/nasal/code.c index 2f75220e..2bf46451 100644 --- a/simgear/nasal/code.c +++ b/simgear/nasal/code.c @@ -71,7 +71,9 @@ static double numify(naContext ctx, naRef o) else if(IS_NIL(o)) ERR(ctx, "nil used in numeric context"); else if(!IS_STR(o)) ERR(ctx, "non-scalar in numeric context"); else if(naStr_tonum(o, &n)) return n; - else ERR(ctx, "non-numeric string in numeric context"); + else naRuntimeError( ctx, + "non-numeric string in numeric context: '%s'", + naStr_data(o) ); return 0; }