What is the best way to exit a running script,
This line crashes octane.
I would like to do some error checking and end the whole thing if one is encountered.
local function showError(text)
type = octane.gui.dialogType.BUTTON_DIALOG,
title = "Error",
text = text }
if x == 0 then
showError("Your error message")
returnto exit your script. If you're writing a script you want to call from the command-line you may return an integer number, which will then be visible as the exit code of the octane process.
error("oops")to raise an error. The effect depends on the context:
os.exit()will exit the application, but I recommend not using this function as it can interfere with the authentication management. For batch processes, use the
--no-guioption instead to exit octane after the script finishes.
Users browsing this forum: No registered users and 1 guest