Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appfolio/ae_network_connection_exception
Handles network connection exceptions
https://github.com/appfolio/ae_network_connection_exception
Last synced: about 2 months ago
JSON representation
Handles network connection exceptions
- Host: GitHub
- URL: https://github.com/appfolio/ae_network_connection_exception
- Owner: appfolio
- License: mit
- Created: 2015-06-04T21:57:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-03T02:25:59.000Z (10 months ago)
- Last Synced: 2024-10-18T03:11:12.039Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 141
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this 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:
```ruby
gem 'ae_network_connection_exception'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install ae_network_connection_exception
## Usage
```ruby
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:
```ruby
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