Sam H
Sam H

Reputation: 976

Is it possible to disable stack traceback in Lua?

Is this possible?

Upvotes: 1

Views: 863

Answers (2)

lhf
lhf

Reputation: 72312

To disable stack traceback in the standalone Lua interpreter, use debug.traceback=nil in your Lua program.

Upvotes: 3

Mud
Mud

Reputation: 28991

By calling the code in question via pcall or xpcall, you can handle errors however you want, including ignoring them completely.

Upvotes: 1

Related Questions