Go to the source code of this file.
Defines | |
#define | FATAL_ERROR(string) lutil_error_fatal(string, __FILE__, __FUNCTION__, __LINE__) |
Display error and die. | |
#define | ERROR(args...) lutil_error(__FILE__, __FUNCTION__, __LINE__, args) |
Display error and continue. | |
Typedefs | |
typedef void(* | UErrorFunc )(const char *string, const char *filename, const char *function, int lineno) |
typedef int(* | UPromptFunc )(const char *title, const char *msg, int nTotal, int nDefault, const char *choice1, va_list args) |
Functions | |
void | lutil_error_setErrorFunc (UErrorFunc errorFunc) |
Set a new function to display errors with. | |
void | lutil_error_setPromptFunc (UPromptFunc promptFunc) |
Set a new function to prompt the user with. | |
void | lutil_error_resetErrorFunc (void) |
Reset the error function to the default error function. | |
void | lutil_error_resetPromptFunc (void) |
Reset the prompt function to the default prompt function. | |
void | lutil_error_fatal (const char *string, const char *filename, const char *function, int lineno) |
Display an error and die. | |
int | lutil_error_prompt (const char *title, const char *msg, int nTotal, int nDefault, const char *choice1,...) |
Prompt the user for input. | |
void | lutil_error (const char *filename, const char *function, int lineno, const char *template,...) __attribute__((format(printf |
Display an error and continue. |
Standard interface for displaying errors and prompting the user for input. Allows the program developer to define how errors are displayed and how prompts are shown while also providing default functions.
Definition in file error.h.
|
|
Display error and die.
|
|
|
|
|
|
Display an error and continue.
|
|
Display an error and die. Display a fatal error message and die. Cannot be overridden. Only called internally when there is a memory failure.
|
|
Prompt the user for input. Prompt the user for input, using the defined prompt function (or the default, if none is defined). Default behavior is not to prompt the user at all, but instead to return the default value.
Definition at line 131 of file error.c. References promptFunc_global. Referenced by luau_downloadUpdate(), and luau_net_downloadUpdate(). |
|
Reset the error function to the default error function.
Definition at line 91 of file error.c. References defaultErrorFunc(), and errorFunc_global. Referenced by luau_resetErrorFunc(). |
|
Reset the prompt function to the default prompt function.
Definition at line 96 of file error.c. References defaultPromptFunc(), and promptFunc_global. Referenced by luau_resetPromptFunc(). |
|
Set a new function to display errors with.
Define a new function to be used for error output. The error function takes a number of pieces of information concerning where the error concerned, but any or all of them may be ignored in accordance with the user's discretion. Function should handle NULL values cleanly. Default behavior (as defined by
*** ERROR *** luau: FILENAME: FUNCTION: STRING
Definition at line 66 of file error.c. References errorFunc_global. Referenced by luau_registerErrorFunc(). |
|
Set a new function to prompt the user with.
Define a new function to be used for prompting the user for input. The default value, specified by
Definition at line 86 of file error.c. References promptFunc_global. Referenced by luau_registerPromptFunc(). |