From 6a1fa87191bfef31ff1b2d47d3ebf281398a210f Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 28 Jun 2017 17:53:59 +0200 Subject: Refactor Formula/Cask dependencies. --- Library/Homebrew/cask/lib/hbc/exceptions.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/cask/lib/hbc/exceptions.rb') diff --git a/Library/Homebrew/cask/lib/hbc/exceptions.rb b/Library/Homebrew/cask/lib/hbc/exceptions.rb index d9e1b07db..1a246be65 100644 --- a/Library/Homebrew/cask/lib/hbc/exceptions.rb +++ b/Library/Homebrew/cask/lib/hbc/exceptions.rb @@ -77,9 +77,15 @@ module Hbc end end - class CaskCyclicCaskDependencyError < AbstractCaskErrorWithToken + class CaskCyclicDependencyError < AbstractCaskErrorWithToken def to_s - "Cask '#{token}' includes cyclic dependencies on other Casks and could not be installed." + "Cask '#{token}' includes cyclic dependencies on other Casks" << (reason.empty? ? "." : ": #{reason}") + end + end + + class CaskSelfReferencingDependencyError < CaskCyclicDependencyError + def to_s + "Cask '#{token}' depends on itself." end end @@ -91,7 +97,7 @@ module Hbc class CaskInvalidError < AbstractCaskErrorWithToken def to_s - "Cask '#{token}' definition is invalid" << (reason.empty? ? ".": ": #{reason}") + "Cask '#{token}' definition is invalid" << (reason.empty? ? "." : ": #{reason}") end end -- cgit v1.2.3