Sha256: c85aa07d1d1d6b0af2f8514226eaac686891c6472d8434b208887170ec469441

Contents?: true

Size: 620 Bytes

Versions: 1

Compression:

Stored size: 620 Bytes

Contents

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
    abort ''
  rescue Exception => error
    puts %Q(
      Oops, Bukin just crashed.  Please report this at http://bit.ly/bukin-issues
      Be sure to include as much information as possible such as your Bukfile,
      Bukfile.lock and the stack trace below.
    )
    raise error
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bukin-0.3.0 lib/bukin/friendly_errors.rb