# HG changeset patch # User Michael Pavone # Date 1405737067 25200 # Node ID 632667d95d35ad18c684de83acd55b4c528ebb40 # Parent 123e9468d55ef12399a00cc9321734d6123ccc57 Improve message not implemented error message diff -r 123e9468d55e -r 632667d95d35 runtime/proghead.inc --- a/runtime/proghead.inc Fri Jul 18 09:55:19 2014 -0700 +++ b/runtime/proghead.inc Fri Jul 18 19:31:07 2014 -0700 @@ -10,8 +10,17 @@ object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args) { + uint32_t *cur; + int slot; fprintf(stderr, "method %s(%d) is not implemented on object %p\n", methodNames[method_id], method_id, self); - fprintf(stderr, "main_module %p\n", main_module); + fputs("Object implements:\n", stderr); + for (slot = 0; slot < 16; slot++) { + if (self->meta->methods[slot]) { + for (cur = self->meta->methods[slot]; *cur != LAST_METHOD; cur++) { + fprintf(stderr, "\t%s\n", methodNames[*cur]); + } + } + } exit(1); return NULL; }