Skip to content

Commit

Permalink
Throw APIException on reloadDatabase fail
Browse files Browse the repository at this point in the history
  • Loading branch information
sylux6 committed Jan 25, 2020
1 parent a68f619 commit b143557
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ object Atago {
* Reload database from remote json
*/
fun reloadDatabase() {
database.loadDatabase()
try {
database.loadDatabase()
} catch (e: Exception) {
throw ApiException("Could not reload database because: ${e.message}")
}
}
}

0 comments on commit b143557

Please sign in to comment.