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
Type
Intent
Optional
Attributes
Name
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.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.