lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

I already talked with brianm about the mod_lua/wombat project and a die(reason)-function, but I think this is a general question, which maybe discussed not only in the irc.

Since there is a os.exit function, which (in mod_lua) kills the apache2 - I was searching for a way to finish scriptexecution somewhere in the script. In PHP there is a function called http://php.net/die - have a look there for details.

Why is this needed? I am using several database and templating connections, but if there is any issues (in 4th, 5th (or more) recusion step) its not possible to stop execution with with if-else-constructs. So a die("Error occured") would be greatly appriciated.

Kind regards,
 Jan (DracoBlue)
------------------------
   http://dracoblue.net