Skip to content

Commit

Permalink
Handle the case the application fails to start
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Sep 30, 2019
1 parent fae727a commit 0296d37
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public static void main(final String[] args) throws Exception {
DeadlockDetector detector = new DeadlockDetector();
AppRuntime runtime = new AppRuntime();) {
runSimulator(runtime);
} catch (final Exception e) {
System.err.println("Failed to initialize application");
e.printStackTrace();
System.exit(1);
}

}
Expand Down Expand Up @@ -91,8 +95,7 @@ private static void runSimulator(final AppRuntime runtime) throws InterruptedExc
username, PASSWORD);

final Device device = new Device(runtime.getVertx(), () -> request, config, username, deviceId,
Tenant.TENANT,
"hono-secret", register, Payload.payload(), stats);
Tenant.TENANT, PASSWORD, register, Payload.payload(), stats);
device.start();

}
Expand Down

0 comments on commit 0296d37

Please sign in to comment.