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

Please use specific exception #29

Closed
Danack opened this issue Aug 11, 2017 · 1 comment
Closed

Please use specific exception #29

Danack opened this issue Aug 11, 2017 · 1 comment

Comments

@Danack
Copy link

Danack commented Aug 11, 2017

Hi,

Currently the code here:

throw new \RuntimeException('Authentication failed');

Is throwing a \RuntimeException. It would allow more precise catching of exceptions if it threw an exception that had a specific meaning.

namespace PHPSecureSession;
class AuthenticationFailedException extends \RuntimeException {
}

as that would allow people to know they are only catching that type of exception, rather than RuntimeExceptions that could be coming from elsewhere in their code.

@ezimuel
Copy link
Owner

ezimuel commented Feb 1, 2018

Fixed and released with version 1.1.0.

@ezimuel ezimuel closed this as completed Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants