Module: NSWTopo::Safely

Includes:
Log
Included in:
Archive, Map
Defined in:
lib/nswtopo/safely.rb

Constant Summary

Constants included from Log

Log::FAILURE, Log::NEUTRAL, Log::SUCCESS, Log::UPDATE

Instance Method Summary collapse

Methods included from Log

#log_abort, #log_neutral, #log_success, #log_update, #log_warn

Instance Method Details

#safely(message) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/nswtopo/safely.rb', line 4

def safely(message)
  yield
rescue Interrupt => interrupt
  log_warn message
  retry
ensure
  raise interrupt if interrupt
end