Skip to content

Commit

Permalink
Add error log at initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikJannsen committed Dec 30, 2022
1 parent e0989fb commit 1a24bd2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ public DefaultApplicationService(String[] args) {
public CompletableFuture<Boolean> initialize() {
return securityService.initialize()
.thenCompose(result -> walletService.initialize())
.whenComplete((r, t) -> setState(State.START_NETWORK))
.whenComplete((result, throwable) -> {
if (throwable == null) {
setState(State.START_NETWORK);
} else {
log.error("Error at walletService.initialize", throwable);
}
})
.thenCompose(result -> networkService.initialize())
.whenComplete((r, t) -> setState(State.NETWORK_STARTED))
.thenCompose(result -> identityService.initialize())
Expand Down

0 comments on commit 1a24bd2

Please sign in to comment.