Skip to content

Commit

Permalink
Merge pull request #663 from amihaiemil/662
Browse files Browse the repository at this point in the history
#662 throw ISE if no PM is found
  • Loading branch information
amihaiemil authored Nov 4, 2020
2 parents 822a2e5 + af31418 commit fe346f8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions self-core-impl/src/main/java/com/selfxdsd/core/BaseRepo.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ public Project activate() {
if (isActive) {
throw new RepoException.AlreadyActive(this.fullName());
}
final Project project = this.storage()
.projectManagers()
.pick(provider())
.assign(this);
final String provider = this.provider();
final ProjectManager manager = this.storage.projectManagers()
.pick(provider);
if(manager == null) {
throw new IllegalStateException(
"No Project Manager found for the " + provider + " Provider. "
+ "Ask the system admin to register one!"
);
}
final Project project = manager.assign(this);
final Wallets wallets = project.wallets();
final Wallet wallet = wallets.register(
project,
Expand Down

0 comments on commit fe346f8

Please sign in to comment.