Skip to content

Commit

Permalink
Catch file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
damontecres committed Jan 29, 2025
1 parent 140ef51 commit 1438701
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.github.damontecres.stashapp.suppliers.FilterArgs
import com.github.damontecres.stashapp.util.plugin.CompanionPlugin
import org.json.JSONArray
import org.json.JSONObject
import java.io.FileNotFoundException

/**
* Represents configuration that users have set server-side
Expand Down Expand Up @@ -42,6 +43,9 @@ class ServerPreferences(
.bufferedReader()
.use { it.readText() }
readUIConfig(JSONObject(jsonStr).toMap())
} catch (ex: FileNotFoundException) {
Log.w(TAG, "UI config file not found")
// no-op
} catch (ex: Exception) {
Log.e(TAG, "Exception reading UI config", ex)
}
Expand Down

0 comments on commit 1438701

Please # to comment.