All,
What is the best way to exit a running script,
os.exit()
This line crashes octane.
I would like to do some error checking and end the whole thing if one is encountered.
thx
local function showError(text)
octane.gui.showDialog{
type = octane.gui.dialogType.BUTTON_DIALOG,
title = "Error",
text = text }
end
if x == 0 then
showError("Your error message")
return
end
return
to 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 --stop-after-script
or --no-gui
option instead to exit octane after the script finishes.Users browsing this forum: No registered users and 16 guests