chore: Update termination/exception handling
This commit is contained in:
parent
f6eacd4d6d
commit
861b7469d2
2 changed files with 57 additions and 50 deletions
|
|
@ -32,9 +32,6 @@ public class CertificateCreationService {
|
|||
) {
|
||||
certificate.setPrivateKey(Files.readAllBytes(certificateCreatorResult.certificateKeyPath()));
|
||||
certificate.setCert(Files.readAllBytes(certificateCreatorResult.certificatePath()));
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new IllegalStateException("Interrupted exception", e);
|
||||
} catch (CommandLineOperationException | IOException e) {
|
||||
throw new IllegalStateException("Failed to create certificate!", e);
|
||||
}
|
||||
|
|
@ -81,8 +78,6 @@ public class CertificateCreationService {
|
|||
return certificateRepository.save(entity);
|
||||
} catch (CommandLineOperationException | IOException e) {
|
||||
throw new RuntimeException("Unable to import certificate", e);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue