Skip to content

Commit 755bc1a

Browse files
committed
refactor: improve panic message
1 parent 3649d2d commit 755bc1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bathbot/src/commands/osu/cards.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,12 @@ async fn card(orig: CommandOrigin<'_>, args: Card<'_>) -> Result<()> {
241241
.mods(score.mods.clone())
242242
.difficulty()
243243
.await
244-
.expect("suspicious maps in top scores are a false positive")
244+
.unwrap_or_else(|| {
245+
panic!(
246+
"suspicious maps in top scores are a false positive (map={})",
247+
score.map_id
248+
)
249+
})
245250
.to_owned();
246251

247252
let attrs = RequiredAttributes {

0 commit comments

Comments
 (0)