Output lastException.txt formatted, so a normal user can read it
Throughout the lifespan of The Sims 4, the modding community has developed ways to more easily identify broken script mods. Such as the 50/50 method or the reports from Better Exceptions or MCCC. Even though both of the reports don't directly instruct the user to view their formatted version of the traceback/call stack from the last exception file, which I will simply call LE from now on, the call stack can still be valuable tool in certain cases.
While the call stack will often be useless to the average user when it comes to diagnosing bugs in general, it does have the potential to be of use in the case of game updates. As was the case with some script mods breaking because of the late August 2025 patch, these can often be attributed to changes in a function’s signature or the renaming/removing of a function.
In such cases an LE’s call stack will directly display the last call to be of the script mod trying to access some non-existent/signature-changed function. Because the path part of a call stack line will also usually include the name or an acronym of a mod in this case, a user can make the educated guess that the mod that is displayed at the bottom is the one that is broken.
However, since LE files are currently output completely unformatted, no such educated guess can be made by a user without first jumping through some hoops or using Better Exceptions or MCCC (which may also be broken by an update). I even wrote a guide on how to format & (somewhat) understand LE files, because I found the 50/50 method used by a lot of people to fix their games quite cumbersome and in the case of script mods breaking because of game updates, just being able to read an LE file makes the process to find the specific mods that are broken take significantly less time in my experience.
As it currently stands, LE files aren't actually read by anyone who isn't a modder, as formatting them is annoying and most people wouldn't even know how to.
My request would be the following changes to LE files:
- Replace “ ” and “ ” with their actual ASCII/UTF counterparts, as these are supposed to be the newline characters 0x0A (LF) and 0x0D (CR) when formatted properly
- Format the LE file like any other XML file that has been run through an XML “pretty print”
- Keep in mind that in the case of the multi-line call stack, that all of it should probably one indentation level deeper than the “desyncdata” XML tag.
Furthermore, I’d optionally also suggest the following:
- Replace “Traceback (most recent call last):” with “Traceback (bottom-most 'File' line happened closest to the exception):”
- The average user will probably understand this more than what is meant by “most recent call last”.
- Re-examine if any of the lines in LE files are now unneeded
- I don’t know if this is actually relevant, but “sessionid” and “desyncid” always seem to be the same string and both “systemconfig” and “screenshot” always seem to be empty for me, though this may be different on other systems.
I have attached two LE files intentionally generated by me. One of them unformatted, as output by the game, and one formatted like I’d suggest.Since I can't seem to attach the files to this post, here they are as links.
Unformatted
Formatted
Since your browser may word-wrap the file when viewed (single lines split over multiple as they can't fit into the width of your window), here is what the formatted file looks like in any text editor (so what you will also use to open it) with word-wrap off:
Image