Mercurial > repos > tabletprog
comparison runtime/proghead.inc @ 269:632667d95d35
Improve message not implemented error message
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 18 Jul 2014 19:31:07 -0700 |
parents | ab7c142090a0 |
children |
comparison
equal
deleted
inserted
replaced
268:123e9468d55e | 269:632667d95d35 |
---|---|
8 | 8 |
9 char * methodNames[]; | 9 char * methodNames[]; |
10 | 10 |
11 object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args) | 11 object * no_impl(uint32_t method_id, uint32_t num_args, object * self, va_list args) |
12 { | 12 { |
13 uint32_t *cur; | |
14 int slot; | |
13 fprintf(stderr, "method %s(%d) is not implemented on object %p\n", methodNames[method_id], method_id, self); | 15 fprintf(stderr, "method %s(%d) is not implemented on object %p\n", methodNames[method_id], method_id, self); |
14 fprintf(stderr, "main_module %p\n", main_module); | 16 fputs("Object implements:\n", stderr); |
17 for (slot = 0; slot < 16; slot++) { | |
18 if (self->meta->methods[slot]) { | |
19 for (cur = self->meta->methods[slot]; *cur != LAST_METHOD; cur++) { | |
20 fprintf(stderr, "\t%s\n", methodNames[*cur]); | |
21 } | |
22 } | |
23 } | |
15 exit(1); | 24 exit(1); |
16 return NULL; | 25 return NULL; |
17 } | 26 } |
18 | 27 |