============ idInterpreter::Error Aborts the currently executing function ============ */
| 466 | ============ |
| 467 | */ |
| 468 | void idInterpreter::Error( const char *fmt, ... ) const { |
| 469 | va_list argptr; |
| 470 | char text[ 1024 ]; |
| 471 | |
| 472 | va_start( argptr, fmt ); |
| 473 | vsprintf( text, fmt, argptr ); |
| 474 | va_end( argptr ); |
| 475 | |
| 476 | StackTrace(); |
| 477 | |
| 478 | if ( ( instructionPointer >= 0 ) && ( instructionPointer < gameLocal.program.NumStatements() ) ) { |
| 479 | statement_t &line = gameLocal.program.GetStatement( instructionPointer ); |
| 480 | common->Error( "%s(%d): Thread '%s': %s\n", gameLocal.program.GetFilename( line.file ), line.linenumber, thread->GetThreadName(), text ); |
| 481 | } else { |
| 482 | common->Error( "Thread '%s': %s\n", thread->GetThreadName(), text ); |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | /* |
| 487 | ============ |
nothing calls this directly
no test coverage detected