CORE-12019 Fix PR comments

This commit is contained in:
Emil Gabrovski 2023-03-28 12:36:08 +03:00
parent bedc850dea
commit 67c888df2b

View File

@ -23,10 +23,10 @@ public class CordaLifeCycleHelper {
Unirest.config().verifySsl(false); Unirest.config().verifySsl(false);
} }
public void startCorda() throws IOException { public void startCorda() throws IOException, CsdeException {
File cordaPIDFile = new File(pc.cordaPidCache); File cordaPIDFile = new File(pc.cordaPidCache);
if (cordaPIDFile.exists()) { if (cordaPIDFile.exists()) {
throw new IOException("Cannot start the Combined worker\nCached process ID file " + cordaPIDFile + " existing.\nWas the combined worker already started?"); throw new CsdeException("Cannot start the Combined worker. Cached process ID file " + cordaPIDFile + " existing. Was the combined worker already started?");
} }
PrintStream pidStore = new PrintStream(new FileOutputStream(cordaPIDFile)); PrintStream pidStore = new PrintStream(new FileOutputStream(cordaPIDFile));
File combinedWorkerJar = pc.project.getConfigurations().getByName("combinedWorker").getSingleFile(); File combinedWorkerJar = pc.project.getConfigurations().getByName("combinedWorker").getSingleFile();
@ -91,7 +91,7 @@ public class CordaLifeCycleHelper {
cordaPIDFile.delete(); cordaPIDFile.delete();
} }
else { else {
throw new CsdeException("Cannot stop the Combined worker\nCached process ID file " + pc.cordaPidCache + " missing.\nWas the combined worker not started?"); throw new CsdeException("Cannot stop the Combined worker. Cached process ID file " + pc.cordaPidCache + " missing. Was the combined worker not started?");
} }
} }
} }