It was thus said that the Great Denis Dos Santos Silva once stated:
The example you gave:
> > > --- example
> > > init c/app
> > > init vm
> > > load/run script (long running)
> > > abort execution (disk full or network failure) with flag of interrupt
> > > script
> > > load/run another script
> > > --- example
appeared to me as a shell script, but otherwise, it wasn't clear what you
meant by "abort execution of the script."
Perhaps the Lua function error() works? Here's what the Lua manual says
about it (
https://www.lua.org/manual/5.4/manual.html#pdf-error):
error (message [, level])
Raises an error (see §2.3) with message as the error object. This
function never returns.
Usually, error adds some information about the error position at the
beginning of the message, if the message is a string. The level
argument specifies how to get the error position. With level 1 (the
default), the error position is where the error function was called.
Level 2 points the error to where the function that called error was
called; and so on. Passing a level 0 avoids the addition of error
position information to the message.
You can "catch" the error with pcall() (and with lua_pcall() with the C
API).
-spc