lib/handcuffs/errors.rb in handcuffs-1.0.2 vs lib/handcuffs/errors.rb in handcuffs-1.1.0

- old
+ new

@@ -3,11 +3,11 @@ class RequiresPhaseArgumentError < HandcuffsError def initialize(task) msg = <<-MESSAGE rake #{task} requires a phase argument. - For example: #{task}[pre_deploy] + For example: #{task}[pre_restart] MESSAGE super(msg) end end @@ -24,9 +24,19 @@ class HandcuffsUnknownPhaseError < HandcuffsError def initialize(phase, phases) msg = <<-MESSAGE Unknown phase #{phase.to_s} Handcuffs is configured to allow #{phases.to_sentence} + MESSAGE + super msg + end + end + + class HandcuffsPhaseUndeclaredError < HandcuffsError + def initialize(found_phases, allowed_phases) + msg = <<-MESSAGE + found declarations for #{found_phases.to_sentence} + but only #{allowed_phases.to_sentence} are allowed MESSAGE super msg end end