Skip to content

Commit

Permalink
Close Vertx when there is an exception
Browse files Browse the repository at this point in the history
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
  • Loading branch information
pierDipi committed Oct 23, 2020
1 parent ff041f6 commit 8cc4e1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ public static void main(final String[] args) {

fw.watch(); // block forever

} catch (InterruptedException | IOException ex) {
} catch (final InterruptedException | IOException ex) {
logger.error("failed during filesystem watch", ex);
vertx.close().onComplete(ignored -> System.exit(1));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ public static void main(final String[] args) {

fw.watch(); // block forever

} catch (InterruptedException | IOException ex) {
} catch (final InterruptedException | IOException ex) {
logger.error("failed during filesystem watch", ex);
vertx.close().onComplete(ignored -> System.exit(1));
}
}
}

0 comments on commit 8cc4e1f

Please sign in to comment.