Mercurial > repos > rhope
changeset 128:5eedee9063dc
Print type name in error message for a missing method
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 05 Nov 2010 02:41:34 +0000 |
parents | 50406500334d |
children | c9974ac32369 |
files | runtime/func.h |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/func.h Fri Nov 05 02:40:51 2010 +0000 +++ b/runtime/func.h Fri Nov 05 02:41:34 2010 +0000 @@ -182,11 +182,13 @@ switch(get_blueprint(cdata->params[0])->type_id)\ { -#define EndMethod(name) \ +#define EndMethod(mname) \ default:\ - printf("Type %d does not implement method %s\n", get_blueprint(cdata->params[0])->type_id, #name);\ + printf("Type ");\ + fwrite( ((t_Array *)((t_String *)get_blueprint(cdata->params[0])->name)->payload.Buffer)+1, 1, ((t_Array *)((t_String *)get_blueprint(cdata->params[0])->name)->payload.Buffer)->payload.Length, stdout);\ + printf("(%d) does not implement method %s\n", get_blueprint(cdata->params[0])->type_id, #mname);\ cdata = alloc_cdata(ct, cdata, 0);\ - cdata->func = FUNC_ ## name;\ + cdata->func = FUNC_ ## mname;\ goto _exception;\ }