Skip to content

Commit

Permalink
use ArgumentError, take "file" out of error
Browse files Browse the repository at this point in the history
  • Loading branch information
perldork committed May 15, 2015
1 parent 0dcf20c commit c1dc04e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/sidekiq/cli.rb
Expand Up @@ -275,11 +275,17 @@ def validate!
next unless options.has_key?(option)

unless options[option].is_a? Integer
raise(%{Configuration file parameter "#{option}": "#{options[option]}" is not a valid integer})
raise(
ArgumentError,
%{Configuration parameter "#{option}": "#{options[option]}" is not a valid integer}
)
end

if options[option] <= 0
raise(%{Configuration file parameter "#{option}": must be > 0 (current value: #{options[option]})})
raise(
ArgumentError,
%{Configuration parameter "#{option}": must be > 0 (current value: #{options[option]})}
)
end
end
end
Expand Down

0 comments on commit c1dc04e

Please sign in to comment.