forked from doctrine/search
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4d452b
commit cd2a48a
Showing
7 changed files
with
92 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
lib/Doctrine/Search/Exception/Driver/ClassIsNotAValidDocumentException.php
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
lib/Doctrine/Search/Exception/Driver/PropertyDoesNotExistsInMetadataException.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
|
||
namespace Doctrine\Search; | ||
|
||
|
||
|
||
interface Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
class DefaultSerializerNotProvidedException extends \LogicException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
class DoctrineSearchException extends \RuntimeException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
class NotImplementedException extends \LogicException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
class InvalidMetadataException extends \LogicException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
class InvalidArgumentException extends \InvalidArgumentException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
class InvalidStateException extends \RuntimeException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
class UnexpectedValueException extends \UnexpectedValueException implements Exception | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
/** | ||
* Exception thrown when an search query unexpectedly does not return any results. | ||
* | ||
* @author robo | ||
* @since 2.0 | ||
*/ | ||
class NoResultException extends \RuntimeException implements Exception | ||
{ | ||
|
||
public function __construct($message = NULL) | ||
{ | ||
parent::__construct($message ?: 'No result was found for query although at least one row was expected.'); | ||
} | ||
} | ||
|
||
|
||
|
||
class UnexpectedTypeException extends \LogicException implements Exception | ||
{ | ||
|
||
public function __construct($value, $expected) | ||
{ | ||
parent::__construct( | ||
sprintf( | ||
'Expected argument of type "%s", "%s" given', | ||
$expected, | ||
(is_object($value) ? get_class($value) : gettype($value)) | ||
) | ||
); | ||
} | ||
} |