18 pf(v,_SC(
"\nCALLSTACK\n"));
21 const SQChar *fn=_SC(
"unknown");
22 const SQChar *src=_SC(
"unknown");
23 if(si.funcname)fn=si.funcname;
24 if(si.source)src=si.source;
25 pf(v,_SC(
"*FUNCTION [%s()] %s line [%d]\n"),fn,src,si.line);
29 pf(v,_SC(
"\nLOCALS\n"));
31 for(level=0;level<10;level++){
39 pf(v,_SC(
"[%s] NULL\n"),name);
43 pf(v,_SC(
"[%s] %d\n"),name,i);
47 pf(v,_SC(
"[%s] %.14g\n"),name,f);
50 pf(v,_SC(
"[%s] USERPOINTER\n"),name);
54 pf(v,_SC(
"[%s] \"%s\"\n"),name,s);
57 pf(v,_SC(
"[%s] TABLE\n"),name);
60 pf(v,_SC(
"[%s] ARRAY\n"),name);
63 pf(v,_SC(
"[%s] CLOSURE\n"),name);
65 case OT_NATIVECLOSURE:
66 pf(v,_SC(
"[%s] NATIVECLOSURE\n"),name);
69 pf(v,_SC(
"[%s] GENERATOR\n"),name);
72 pf(v,_SC(
"[%s] USERDATA\n"),name);
75 pf(v,_SC(
"[%s] THREAD\n"),name);
78 pf(v,_SC(
"[%s] CLASS\n"),name);
81 pf(v,_SC(
"[%s] INSTANCE\n"),name);
84 pf(v,_SC(
"[%s] WEAKREF\n"),name);
88 pf(v,_SC(
"[%s] %s\n"),name,b?_SC(
"true"):_SC(
"false"));
91 default: assert(0);
break;
106 pf(v,_SC(
"\nAN ERROR HAS OCCURED [%s]\n"),sErr);
109 pf(v,_SC(
"\nAN ERROR HAS OCCURED [unknown]\n"));
121 pf(v,_SC(
"%s line = (%d) column = (%d) : error %s\n"),sSource,line,column,sErr);
void sq_pop(HSQUIRRELVM v, SQInteger nelemstopop)
void sqstd_printcallstack(HSQUIRRELVM v)
void sqstd_seterrorhandlers(HSQUIRRELVM v)
SQRESULT sq_getinteger(HSQUIRRELVM v, SQInteger idx, SQInteger *i)
SQInteger sq_gettop(HSQUIRRELVM v)
void sq_newclosure(HSQUIRRELVM v, SQFUNCTION func, SQUnsignedInteger nfreevars)
void sq_setcompilererrorhandler(HSQUIRRELVM v, SQCOMPILERERROR f)
SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v)
SQRESULT sq_getfloat(HSQUIRRELVM v, SQInteger idx, SQFloat *f)
void _sqstd_compiler_error(HSQUIRRELVM v, const SQChar *sErr, const SQChar *sSource, SQInteger line, SQInteger column)
static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
SQObjectType sq_gettype(HSQUIRRELVM v, SQInteger idx)
SQRESULT sq_getstring(HSQUIRRELVM v, SQInteger idx, const SQChar **c)
void sq_seterrorhandler(HSQUIRRELVM v)
const SQChar * sq_getlocal(HSQUIRRELVM v, SQUnsignedInteger level, SQUnsignedInteger idx)
SQRESULT sq_getbool(HSQUIRRELVM v, SQInteger idx, SQBool *b)
SQRESULT sq_stackinfos(HSQUIRRELVM v, SQInteger level, SQStackInfos *si)