MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / Error

Method Error

neo/game/script/Script_Interpreter.cpp:468–484  ·  view source on GitHub ↗

============ idInterpreter::Error Aborts the currently executing function ============ */

Source from the content-addressed store, hash-verified

466============
467*/
468void 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============

Callers

nothing calls this directly

Calls 4

vsprintfFunction · 0.85
NumStatementsMethod · 0.45
GetFilenameMethod · 0.45
GetThreadNameMethod · 0.45

Tested by

no test coverage detected