composer package updates
[openemr.git] / vendor / doctrine / couchdb / lib / Doctrine / CouchDB / CouchDBException.php
blobf0a0556f63b3ab7e2326dcdac374373887a2b5db
1 <?php
2 /*
3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * This software consists of voluntary contributions made by many individuals
16 * and is licensed under the MIT license. For more information, see
17 * <http://www.doctrine-project.org>.
20 namespace Doctrine\CouchDB;
22 /**
23 * Base exception class for package Doctrine\ODM\CouchDB
25 * @license http://www.opensource.org/licenses/mit-license.php MIT
26 * @link www.doctrine-project.com
27 * @since 1.0
28 * @author Benjamin Eberlei <kontakt@beberlei.de>
30 class CouchDBException extends \Exception
33 public static function unknownDocumentNamespace($documentNamespaceAlias)
35 return new self("Unknown Document namespace alias '$documentNamespaceAlias'.");
38 public static function unregisteredDesignDocument($designDocumentName)
40 return new self("No design document with name '" . $designDocumentName . "' was registered with the DocumentManager.");
43 public static function invalidAttachment($className, $id, $filename)
45 return new self("Trying to save invalid attachment with filename " . $filename . " in document " . $className . " with id " . $id);
48 public static function detachedDocumentFound($className, $id, $assocName)
50 return new self("Found a detached or new document at property " .
51 $className . "::" . $assocName. " of document with ID " . $id . ", ".
52 "but the assocation is not marked as cascade persist.");
55 public static function persistRemovedDocument()
57 return new self("Trying to persist document that is scheduled for removal.");
60 public static function luceneNotConfigured()
62 return new self("CouchDB Lucene is not configured. You have to configure the handler name to enable support for Lucene Queries.");