throw new RuntimeException( String.format("An IO error occurred while starting a %s in %s on %s: %s", getServiceName(), getWorkingDirectory(), getId(), e.getMessage()), e); } catch (FileAlreadyExistsException e) { throw new RuntimeException( String.format("A PID file already exists and a %s may be running in %s on %s.", getServiceName(), getWorkingDirectory(), getId()), e); } catch (PidUnavailableException e) { throw new RuntimeException( String.format("The process ID could not be determined while starting %s %s in %s: %s", getServiceName(), getId(), getWorkingDirectory(), e.getMessage()), e); } catch (Error | RuntimeException e) { throw new IllegalStateException( String.format("A %s is already running in %s on %s.", getServiceName(), getWorkingDirectory(), getId()));