Improve handling of missing (illegal) configuration.
This commit is contained in:
parent
d74ec52441
commit
0c4cb7e9b4
1 changed files with 7 additions and 6 deletions
|
|
@ -342,15 +342,16 @@ public class Runner extends Component {
|
|||
*/
|
||||
@Handler(priority = 100)
|
||||
public void onStart(Start event) {
|
||||
rep = newEventPipeline();
|
||||
event.setAssociated(EventPipeline.class, rep);
|
||||
try {
|
||||
if (config == null) {
|
||||
// Missing configuration, fail
|
||||
event.cancel(true);
|
||||
fire(new Stop());
|
||||
return;
|
||||
}
|
||||
|
||||
rep = newEventPipeline();
|
||||
event.setAssociated(EventPipeline.class, rep);
|
||||
try {
|
||||
// Store process id
|
||||
try (var pidFile = Files.newBufferedWriter(
|
||||
config.runtimeDir.resolve("runner.pid"))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue