AI exception stack trace

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 13 Jul 2008 00:57
Contact:

AI exception stack trace

Post by Michiel »

Is it possible to get a full stack trace for an exception, when catching it in the AI?

Context: I recently added a top-level try/catch so that the AI can try to continue if something unexpected goes wrong. However, I would still like to be able to get the full stack trace in the log for debugging. However, getstackinfos doesn't appear to be available, and if I catch and rethrow an exception so it bubbles up to the interpreter, the original file and line number are lost.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 18 guests