aot_err_handler Subroutine

public subroutine aot_err_handler(L, err, msg, ErrString, ErrCode)

Error handler to capture Lua errors.

This routine encapsulates the retrieval of error messages from the Lua stack upon a failing Lua operation. It should be be used after all flu functions that return an err argument as result. Examples are fluL_loadfile and flu_pcall. The ErrString and ErrCode parameters are both optional. If none of them are provided, the execution will be stopped if an error had occured and err is not 0. The error message will be written to standard output in this case.

If either of them is provided, the application will continue and the calling side has to deal with the occured error.

Arguments

TypeIntentOptionalAttributesName
type(flu_State) :: L

Handle to the Lua script

integer, intent(in) :: err

Lua error code to evaluate

character(len=*), intent(in) :: msg

Some additional message that should be prepended to the Lua error message if the program is stopped by the handler (no ErrString or ErrCode provided).

character(len=*), intent(out), optional :: ErrString

Resulting error string obtained by combining msg and the error description on the Lua stack.

integer, intent(out), optional :: ErrCode

The Lua error code, just the same as err.


Calls

proc~~aot_err_handler~~CallsGraph proc~aot_err_handler aot_err_handler proc~flu_tolstring flu_tolstring proc~aot_err_handler->proc~flu_tolstring interface~lua_tolstring lua_tolstring proc~flu_tolstring->interface~lua_tolstring

Called by

proc~~aot_err_handler~~CalledByGraph proc~aot_err_handler aot_err_handler proc~open_config_buffer open_config_buffer proc~open_config_buffer->proc~aot_err_handler proc~aot_file_to_buffer aot_file_to_buffer proc~aot_file_to_buffer->proc~aot_err_handler proc~aot_fun_do aot_fun_do proc~aot_fun_do->proc~aot_err_handler proc~open_config_file open_config_file proc~open_config_file->proc~aot_err_handler proc~open_config_chunk open_config_chunk proc~open_config_chunk->proc~aot_err_handler proc~aot_path_open_table aot_path_open_table proc~aot_path_open_table->proc~open_config_file proc~aot_require_buffer aot_require_buffer proc~aot_require_buffer->proc~open_config_buffer proc~aot_path_open_fun aot_path_open_fun proc~aot_path_open_fun->proc~aot_path_open_table interface~aot_path_open aot_path_open interface~aot_path_open->proc~aot_path_open_table interface~aot_path_open->proc~aot_path_open_fun

Contents


Variables

TypeVisibilityAttributesNameInitial
logical, private :: stop_on_error
character, private, pointer, dimension(:):: string
integer, private :: str_len
integer, private :: i