lib/bukin/friendly_errors.rb in bukin-0.2.0 vs lib/bukin/friendly_errors.rb in bukin-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
require 'socket'
module Bukin
def self.with_friendly_errors
yield
+ rescue BukinError => error
+ abort error.message
rescue SocketError => error
abort "#{error.message}\nCheck that you have a stable connection and the service is online"
rescue Errno::ENOENT => error
abort error.message
rescue Interrupt