Skip to content

Commit 494918f

Browse files
committed
例外処理の時にタイトルを表示させた
1 parent 4dee8dc commit 494918f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tasks/podcasts.rake

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace :podcasts do
2323
Podcast.transaction do
2424
rss.items.each_with_index do |item, index|
2525
episode_id = item.title.split('-').first.to_i
26-
raise StandardError.new("ID 取得に失敗しました。") if episode_id.zero?
26+
raise StandardError.new("ID 取得に失敗しました。(Title: #{item.title})") if episode_id.zero?
2727

2828
episode = Podcast.find_by(id: episode_id) || Podcast.new(id: episode_id)
2929
episode.new_record? ?

0 commit comments

Comments
 (0)