What?
It would be mighty nice if the game produced a longer (full) stack trace when encountering an error during startup.
Examples
This is how a generic error during data.lua looks:
It only tells me that somewhere deep down in my library something caused an error, but i have no clue where it comes from. Ofc, i know i can insert a breakpoint and print a stacktrace from there myself:
But digging down into the lib, inserting a breakpoint, fixing the bug, removing the breakpoint... is repetitive and would in most cases be solved if the game just showed a full trace in the first place. Also not every modder (especially inexperienced ones) has a self-made stack trace printer. So this would hopefully help them greatly :). This could be dis-/enabled via a command line option if deemed nessecary, but would make it slightly less useful to new modders who might not know about it.
Longer Stacktrace (cli option)
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Longer Stacktrace (cli option)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Longer Stacktrace (cli option)
I've looked into this before and we aren't limiting the stack trace that lua generates. Simply it doesn't generate the full stack trace in all instances and I don't know why.
If you do, I can fix it
If you do, I can fix it

If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Longer Stacktrace (cli option)
Alas i don't though *sigh*. Random googling comes up with this stackoverflow question talking about pcall truncating stack traces and possible workarounds. But i don't even know anything about how the c-side of things does anything
.

Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.