lib/slack/web/api/endpoints/oauth_v2.rb in slack-ruby-client-1.1.0 vs lib/slack/web/api/endpoints/oauth_v2.rb in slack-ruby-client-2.0.0

- old
+ new

@@ -35,11 +35,11 @@ # @option options [string] :client_secret # Issued when you created your application. # @see https://api.slack.com/methods/oauth.v2.exchange # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.exchange.json def oauth_v2_exchange(options = {}) - throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil? - throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil? + raise ArgumentError, 'Required arguments :client_id missing' if options[:client_id].nil? + raise ArgumentError, 'Required arguments :client_secret missing' if options[:client_secret].nil? post('oauth.v2.exchange', options) end end end end