Merge pull request #1243 from reitermarkus/rename-deprecation-exception
Rename FormulaMethodDeprecatedError to MethodDeprecatedError.
This commit is contained in:
commit
c78d1e6bb5
@ -56,7 +56,7 @@ end
|
|||||||
|
|
||||||
class FormulaSpecificationError < StandardError; end
|
class FormulaSpecificationError < StandardError; end
|
||||||
|
|
||||||
class FormulaMethodDeprecatedError < StandardError; end
|
class MethodDeprecatedError < StandardError; end
|
||||||
|
|
||||||
class FormulaUnavailableError < RuntimeError
|
class FormulaUnavailableError < RuntimeError
|
||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
@ -4,7 +4,7 @@ class FormulaVersions
|
|||||||
IGNORED_EXCEPTIONS = [
|
IGNORED_EXCEPTIONS = [
|
||||||
ArgumentError, NameError, SyntaxError, TypeError,
|
ArgumentError, NameError, SyntaxError, TypeError,
|
||||||
FormulaSpecificationError, FormulaValidationError,
|
FormulaSpecificationError, FormulaValidationError,
|
||||||
ErrorDuringExecution, LoadError, FormulaMethodDeprecatedError
|
ErrorDuringExecution, LoadError, MethodDeprecatedError
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
attr_reader :name, :path, :repository, :entry_name
|
attr_reader :name, :path, :repository, :entry_name
|
||||||
|
@ -249,7 +249,7 @@ class UtilTests < Homebrew::TestCase
|
|||||||
|
|
||||||
def test_odeprecated
|
def test_odeprecated
|
||||||
ARGV.stubs(:homebrew_developer?).returns false
|
ARGV.stubs(:homebrew_developer?).returns false
|
||||||
e = assert_raises(FormulaMethodDeprecatedError) do
|
e = assert_raises(MethodDeprecatedError) do
|
||||||
odeprecated("method", "replacement",
|
odeprecated("method", "replacement",
|
||||||
caller: ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"],
|
caller: ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"],
|
||||||
die: true)
|
die: true)
|
||||||
|
@ -83,7 +83,7 @@ def odeprecated(method, replacement = nil, options = {})
|
|||||||
|
|
||||||
if ARGV.homebrew_developer? || options[:die] ||
|
if ARGV.homebrew_developer? || options[:die] ||
|
||||||
Homebrew.raise_deprecation_exceptions?
|
Homebrew.raise_deprecation_exceptions?
|
||||||
raise FormulaMethodDeprecatedError, message
|
raise MethodDeprecatedError, message
|
||||||
else
|
else
|
||||||
opoo "#{message}\n"
|
opoo "#{message}\n"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user