KeyValueStore
KeyValueStore copied to clipboard
Moved to a more structured hierarchy
With this structure every exception thrown by the key value store is marked with a specific interface.
Use case:
try {
// extract values from a DBAL storage
} catch (\Doctrine\KeyValueStore\Exception\NotFoundException $e) {
// data not found
} catch (\Doctrine\KeyValueStore\Storage\Exception\Exception $e) {
// generic storage-level exception
} catch (\Doctrine\KeyValueStore\Exception\RuntimeException $e) {
// EntityManager or UnitOfWork runtime exception (extends \RuntimeException)
} catch (\Doctrine\KeyValueStore\Exception\Exception $e) {
// EntityManager or UnitOfWork exception (extends \Exception)
} catch (\Doctrine\KeyValueStore\Exception $e) {
// generic key value store exception
} catch (\Exception $e) {
// generic exception
}
This is a RFC with the basic structure only, later I'll add message methods (following this article) and tests.
ping @Ocramius @beberlei