Ejemplo n.º 1
0
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);
  }
}
Ejemplo n.º 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);
  }
}
Ejemplo n.º 3
0
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");
  }
}
Ejemplo n.º 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);
  }
}
Ejemplo n.º 5
0
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);
  }
}
Ejemplo n.º 6
0
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");
  }
}