Module: AsyncIO::Rescuer
Instance Method Summary collapse
-
#rescuer ⇒ Object
Rescues any sort of exception raised and log it to a default logger, returns :rescued if any exception was raised.
Instance Method Details
#rescuer ⇒ Object
Rescues any sort of exception raised and log it to a default logger, returns :rescued if any exception was raised.
9 10 11 12 13 14 15 16 |
# File 'lib/async_io/rescuer.rb', line 9 def rescuer begin yield rescue Exception => notice AsyncIO::Logger.error("[-:AsyncIO::AsyncIO:-] - #{notice}\n") :rescued end end |