Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Moved to a more structured hierarchy #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EmanueleMinotto
Copy link
Member

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.

@EmanueleMinotto
Copy link
Member Author

ping @Ocramius @beberlei

@EmanueleMinotto EmanueleMinotto removed this from the 1.0.0 milestone Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant