Skip to content

Commit

Permalink
Merge pull request #46 from vinted/fix_puts_ignoring_logging
Browse files Browse the repository at this point in the history
Fix: one of the `puts` was ignoring @@logging flag
  • Loading branch information
treeder committed Jul 15, 2013
2 parents a0138f5 + ba8bd00 commit 7490ea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mini_fb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def self.fetch(url, options={})

return res_hash
rescue RestClient::Exception => ex
puts "ex.http_code=" + ex.http_code.to_s
puts "ex.http_code=" + ex.http_code.to_s if @@logging
puts 'ex.http_body=' + ex.http_body if @@logging
res_hash = JSON.parse(ex.http_body) # probably should ensure it has a good response
raise MiniFB::FaceBookError.new(ex.http_code, "#{res_hash["error"]["type"]}: #{res_hash["error"]["message"]}")
Expand Down

0 comments on commit 7490ea0

Please sign in to comment.