For context, I am trying to do a save system for a game.

  • sgc2000@programming.dev
    link
    fedilink
    arrow-up
    6
    arrow-down
    2
    ·
    2 months ago

    You should do both. Creation and catching of exceptions can be an expensive process and even if the check for the file succeeds the loading of the file may not in which case you’ll need to handle the exceptions anyway.