Print exception stack trace in CsPackageManager.TryRun
This is not very helpful
I suggest replacing it with at least this
Notes
You can just print e, but it's a bit ugly:
Idk how to capture line number
Also, in theory there's a simpler method:
StackTrace st = new StackTrace(e);
st = new StackTrace(st.GetFrames().SkipLast(1));
But it's not available in .NET 6 :BaroDev:
At first i thought inner exception could never happen and is useless but now i found that exceptions in static constructors could trigger it I added some prints but i didn't test them yet I obviously tested it by just replacing TryRun with harmony, but i can't do that for inner exception because it happens before my testing mod initialize :BaroDev: So i guess i need to compile luatrauma to test it, and it'll probably take me a few hours to figure out how to compile it in VSCode :BaroDev:
EDIT: seems working
Hi Honk,
This is a good PR. I won't be able to merge it as we're doing a big code refactor. However, I will be manually implementing this into the Runner. Thanks for the contribution.
I'm going to leave the PR open for now and will close it once implemented.