| 3186 | } |
| 3187 | |
| 3188 | static void argument_error( char const * message, FUNCTION * procedure, |
| 3189 | FRAME * frame, OBJECT * arg ) |
| 3190 | { |
| 3191 | extern void print_source_line( FRAME * ); |
| 3192 | LOL * actual = frame->args; |
| 3193 | backtrace_line( frame->prev ); |
| 3194 | out_printf( "*** argument error\n* rule %s ( ", frame->rulename ); |
| 3195 | argument_list_print( procedure->formal_arguments, |
| 3196 | procedure->num_formal_arguments ); |
| 3197 | out_printf( " )\n* called with: ( " ); |
| 3198 | lol_print( actual ); |
| 3199 | out_printf( " )\n* %s %s\n", message, arg ? object_str ( arg ) : "" ); |
| 3200 | function_location( procedure, &frame->file, &frame->line ); |
| 3201 | print_source_line( frame ); |
| 3202 | out_printf( "see definition of rule '%s' being called\n", frame->rulename ); |
| 3203 | backtrace( frame->prev ); |
| 3204 | exit( EXITBAD ); |
| 3205 | } |
| 3206 | |
| 3207 | static void type_check_range( OBJECT * type_name, LISTITER iter, LISTITER end, |
| 3208 | FRAME * caller, FUNCTION * called, OBJECT * arg_name ) |
no test coverage detected