lib/containers_manager/cli.rb in containers_manager-0.1.4 vs lib/containers_manager/cli.rb in containers_manager-0.1.5

- old
+ new

@@ -4,10 +4,25 @@ class Cli < Thor include Thor::Actions desc 'exec', 'Execute jobs to manage containers' def exec - Application.exec + exception_rescue do + Application.exec + end + end + + desc 'check', 'Output the configuration' + def exec + exception_rescue do + Application.check + end + end + + private + + def exception_rescue + yield rescue Exception => e $stdout.puts(e.message) end end end