Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: mention in MacOS / Windows crashlog popup when files couldn't be generated #11239

Merged
merged 1 commit into from
Aug 27, 2023

Conversation

TrueBrain
Copy link
Member

Motivation / Problem

On MacOS / Windows, you don't always see the console. As such, it might be unclear why a file doesn't exist while the dialog said it should been there.

This mostly happens when crash.sav causes a segfault (due to corruption as to why the crashlog is being created). This is trapped correctly, and on the console you can read it went wrong. But the file is still mentioned in the dialog. This can be confusing.

Description

When a TryExcept block fails, update the filename to mention it failed. This is save, the filename is not used for any other purpose than to display the location to the user.

PS: as bonus, change the return value of MakeCrashLog a void, as nobody was actually monitoring the return value.

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, game_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

… be generated

For example, if the crash.sav couldn't be created, and the TryExcept
detected an issue, write out that the file is not available in
the popup.
@TrueBrain TrueBrain enabled auto-merge (squash) August 27, 2023 22:09
@TrueBrain TrueBrain merged commit de5e338 into OpenTTD:master Aug 27, 2023
19 checks passed
@TrueBrain TrueBrain deleted the crashlog-filenames branch January 18, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants