SetUserError

Imposta la variabile predefinita _LastError nel valore pari a ERR_USER_ERROR_FIRST + user_error

void  SetUserError(
   ushort user_error,   // numero errore
   );

Parametri

user_error

[in] Error numero impostato da un utente.

Valore restituito

Nessun valore restituito.

Nota

Dopo che un errore è stato impostato utilizzando la funzione SetUserError(user_error), GetLastError() restituisce il valore pari a ERR_USER_ERROR_FIRST + user_error.

Esempio:

voidOnStart()
  {
//--- imposta il numero errore 65537=(ERR_USER_ERROR_FIRST +1)
   SetUserError(1);
//--- ottiene l' ultimo codice di errore
   Print("GetLastError = ",GetLastError());
/* 
   Result
   GetLastError = 65537
*/ 
  }