Module: Befog::Commands::Mixins::Safely
- Defined in:
- lib/befog/commands/mixins/safely.rb
Instance Method Summary collapse
Instance Method Details
#safely ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/befog/commands/mixins/safely.rb', line 6 def safely begin yield rescue Befog::CLI::Error => e $stderr.puts "befog #{command.name}: #{e.}" exit(-1) rescue => e # uh-oh $stderr.puts "Unexpected error" $stderr.puts "#{e.class}: #{e.}" $stderr.puts e.backtrace exit(-1) end end |