示例#1
0
文件: ldo.c 项目: 0gb-us/minetest-irc
void luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {
    L->errorJmp->status = errcode;
    LUAI_THROW(L, L->errorJmp);
  }
  else {
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    exit(EXIT_FAILURE);
  }
}
示例#2
0
void luaD_throw (lua_State *L, int errcode) {
  unfixedstack(L); /* make sure the fixedstack & block_gc flags get reset. */
  unset_block_gc(L);
  if (L->errorJmp) {
    L->errorJmp->status = errcode;
    LUAI_THROW(L, L->errorJmp);
  }
  else {
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    exit(EXIT_FAILURE);
  }
}
示例#3
0
文件: ldo.cpp 项目: AReim1982/scummvm
void luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {
    L->errorJmp->status = errcode;
    // LUAI_THROW is sometimes used to ignore the error and restore LUA state
    LUAI_THROW(L, L->errorJmp);
    error("LUA error occurred, error code is %d (%s)", errcode, luaErrorDescription[errcode]);
  }
  else {
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    error("luaD_throw failure");
  }
}
示例#4
0
void luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {
	lprintfln("luaD_throw errcode: %i\n", errcode);
	//maPanic(0, "trhow");
    L->errorJmp->status = errcode;
    LUAI_THROW(L, L->errorJmp);
  }
  else {
	lprintfln("luaD_throw exit errcode: %i\n", errcode);
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    exit(EXIT_FAILURE);
  }
}
示例#5
0
文件: ldo.c 项目: niziak/ethernut-4.9
void luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {
    L->errorJmp->status = errcode;
    LUAI_THROW(L, L->errorJmp);
  }
  else {
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    printf("lua throw calling ");
    while(1);
    // todo ezt itt ki kell váltani vmivel
    //exit(EXIT_FAILURE);
  }
}
示例#6
0
文件: ldo.cpp 项目: CatalystG/scummvm
void luaD_throw (lua_State *L, int errcode) {
  if (L->errorJmp) {
    L->errorJmp->status = errcode;
    // LUAI_THROW has been replaced with an error message in ScummVM, together
    // with the LUA error code and description
    //LUAI_THROW(L, L->errorJmp);
    error("LUA error occured, error code is %d (%s)", errcode, luaErrorDescription[errcode]);
  }
  else {
    L->status = cast_byte(errcode);
    if (G(L)->panic) {
      resetstack(L, errcode);
      lua_unlock(L);
      G(L)->panic(L);
    }
    error("luaD_throw failure");
  }
}