Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To be able to throw an exception when a session key is not found #3

Closed
khalyomede opened this issue Sep 14, 2020 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@khalyomede
Copy link
Contributor

Description

When a user tries to get a session by its key, and this key is not set, I should raise an meaningful error.

Expected behavior

To be able to set the key in the error as following:

use Folded\Exceptions\SessionKeyNotFoundException;

$exception = SessionKeyNotFoundException("key foo not found");
$exception->setKey("foo");

echo $exception->getKey(); // "foo"

Actual behavior

No exception to raise in this case.

Alternatives solutions

Raising an OutOfRangeException for now.

Notes

@khalyomede khalyomede added the enhancement New feature or request label Sep 14, 2020
@khalyomede khalyomede self-assigned this Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant