Skip to content

Commit

Permalink
slightly better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ManApart committed Jun 22, 2024
1 parent 0892a42 commit 1a28652
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/ModAdder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ suspend fun fetchModInfo(id: Int, fileId: Int? = null): Mod? {
suspend fun updateModInfo(id: Int) {
val modInfo = getModDetails(toolConfig.apiKey!!, id)
if (modInfo == null) {
println(red("Unable to get mod info for $id"))
println(red("Unable to get mod info for ${toolData.byId(id)?.description() ?: id}"))
return
}
val modFileId = getModFiles(toolConfig.apiKey!!, id)?.getPrimaryFile()
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/nexus/NexusClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ suspend fun getModDetails(apiKey: String, id: Int): ModInfo? {
commonHeaders(apiKey)
}.body()
} catch (e: Exception) {
println(e.message ?: "")
verbose(e.message ?: "")
verbose(e.stackTraceToString())
null
}
Expand Down Expand Up @@ -174,4 +174,4 @@ private suspend fun endorseMod(apiKey: String, modId: Int, endorse: Boolean) {
println(e.message ?: "")
verbose(e.stackTraceToString())
}
}
}

0 comments on commit 1a28652

Please sign in to comment.