lib/bolt/error.rb in bolt-1.30.1 vs lib/bolt/error.rb in bolt-1.31.0
- old
+ new
@@ -31,14 +31,18 @@
def to_puppet_error
Puppet::DataTypes::Error.from_asserted_hash(to_h)
end
def self.unknown_task(task)
- "Could not find a task named \"#{task}\". For a list of available tasks, run \"bolt task show\""
+ new("Could not find a task named \"#{task}\". For a list of available tasks, run \"bolt task show\"",
+ 'bolt/unknown-task')
end
def self.unknown_plan(plan)
- "Could not find a plan named \"#{plan}\". For a list of available plans, run \"bolt plan show\""
+ new(
+ "Could not find a plan named \"#{plan}\". For a list of available plans, run \"bolt plan show\"",
+ 'bolt/unknown-plan'
+ )
end
end
class CLIError < Bolt::Error
def initialize(msg)