Low commit activity in last 3 years
A long-lived project that still receives updates
Catch exceptions related to establishing a network connection and return a generic error.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

AeNetworkConnectionException

Catch exceptions related to establishing a network connection and return a generic error.

Installation

Add this line to your application's Gemfile:

gem 'ae_network_connection_exception'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ae_network_connection_exception

Usage

AeNetworkConnectionException.try do
  # your code that will make a network call
end

If your network call failed to establish a network connection, an exception of this type will be thrown:

AeNetworkConnectionException::ConnectionNotEstablished

Contributing

  1. Fork it (https://github.com/appfolio/ae_network_connection_exception/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request