We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1ee96ae + 178c661 commit d43b06eCopy full SHA for d43b06e
README.md
@@ -187,6 +187,26 @@ end
187
# => 1
188
```
189
190
+## Error Handling
191
+
192
+In general, if something goes wrong you'll get an exception. For example, if
193
+it can't connect to the server a `Redis::CannotConnectError` error will be raised.
194
195
+```ruby
196
+begin
197
+ redis.ping
198
+rescue Exception => e
199
+ e.inspect
200
+# => #<Redis::CannotConnectError: Timed out connecting to Redis on 10.0.1.1:6380>
201
202
+ e.message
203
+# => Timed out connecting to Redis on 10.0.1.1:6380
204
+end
205
+```
206
207
+See lib/redis/errors.rb for information about what exceptions are possible.
208
209
210
## Expert-Mode Options
211
212
- `inherit_socket: true`: disable safety check that prevents a forked child
0 commit comments