Handling Errors with the C SDK
Common errors and exceptions, and how to handle them.
These pages cover the Alpha of the Couchbase C SDK. As such they are likely to change without notice. This alpha code should not be used in production.
Documentation is incomplete, subject to change, and likely to contain broken links.
Errors are inevitable. The developer’s job is to be prepared for whatever is likely to come up — and to try and be prepared for anything that conceivably could come up. Couchbase gives you a lot of flexibility, but it is recommended that you equip yourself with an understanding of the possibilities.
Couchbase-specific exceptions are all derived from
Errors that cannot be recovered by the SDK will be returned to the application.
These unrecoverable errors are left to the application developer to handle — this section covers handling many of the common error scenarios.
The approach will depend upon the type of error thrown. Is it transient? Is it even recoverable?
Error codes are listed in the API docs.