fixed exception
This commit is contained in:
parent
dab0deea20
commit
2ab160275c
|
@ -39,7 +39,7 @@ public class SecretManager {
|
|||
|
||||
public synchronized void startSession(Secret secret) throws Exception {
|
||||
if (currentSecretHolder != initialSecretHolder) {
|
||||
throw new Exception("You are already in a session. You must terminate the session first.");
|
||||
throw new RuntimeException("You are already in a session. You must terminate the session first.");
|
||||
}
|
||||
initialSecretHolder.reset();
|
||||
currentSecretHolder = new SecretHolder(secret);
|
||||
|
@ -48,7 +48,7 @@ public class SecretManager {
|
|||
|
||||
public synchronized void startSession(Collection<Secret> secrets) throws Exception {
|
||||
if (currentSecretHolder != initialSecretHolder) {
|
||||
throw new Exception("You are already in a session. You must terminate the session first.");
|
||||
throw new RuntimeException("You are already in a session. You must terminate the session first.");
|
||||
}
|
||||
initialSecretHolder.reset();
|
||||
currentSecretHolder = new SecretHolder(secrets);
|
||||
|
@ -57,7 +57,7 @@ public class SecretManager {
|
|||
|
||||
public synchronized void startSession(SecretHolder secretHolder) throws Exception {
|
||||
if (currentSecretHolder != initialSecretHolder) {
|
||||
throw new Exception("You are already in a session. You must terminate the session first.");
|
||||
throw new RuntimeException("You are already in a session. You must terminate the session first.");
|
||||
}
|
||||
initialSecretHolder.reset();
|
||||
currentSecretHolder = secretHolder;
|
||||
|
|
Loading…
Reference in New Issue