Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: PHP 1.1
Community Wiki and Resources
Wiki: PHP Client Library
PHP Client Library
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
SDK Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
3.1 Error Handling
Chapter Sections
Chapters

3.1.1. Exceptions

Exceptions are used within the PHP Couchbase client library to raise an error within an operation. The exceptions are all inherited from the base CouchbaseException class, or you can trap for specific exceptions. The error string associated with the exception will provide more information about the error.

For example:

try {
    $oo->touch("spoon", 1);
} catch (CouchbaseException $e) {
    echo "Error: " + $e;
}

The supported exceptions are listed below: