Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Commit

Permalink
adding better error warning during run phase.
Browse files Browse the repository at this point in the history
  • Loading branch information
gleuch committed Jan 13, 2010
1 parent 2ed4b4e commit 33bd9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/admin.rb
Expand Up @@ -45,7 +45,7 @@
tweet = read_from_file(file, (userfile.cursor_position || 0))

# Start tweet if there is something to tweet.
unless tweet[:msg].blank?
unless tweet.blank? || tweet[:msg].blank?
info = @twitter_client.update(tweet[:msg].to_s)
if info && (info['id'].to_s || '').match(/\d+/)
userfile.update(:active => true, :cursor_position => tweet[:cursor])
Expand All @@ -67,7 +67,7 @@
end
end
rescue
(@errors ||= []) << "<strong>There was an error sending a file for @#{user.screen_name}.</strong>"
(@errors ||= []) << "<strong>#{$! || "There was an error sending a file"} for @#{user.screen_name}.</strong>"
end
end

Expand Down

0 comments on commit 33bd9ff

Please sign in to comment.