Search in sources :

Example 1 with RaidNotFoundException

use of pokeraidbot.domain.errors.RaidNotFoundException in project pokeraidbot by magnusmickelsson.

the class RaidRepository method getActiveRaidOrFallbackToExRaid.

public Raid getActiveRaidOrFallbackToExRaid(Gym gym, String region, User user) {
    RaidEntity raidEntity = getActiveOrFallbackToExRaidEntity(gym, region);
    if (raidEntity == null) {
        throw new RaidNotFoundException(gym, localeService, user);
    }
    final Raid raid = getRaidInstance(raidEntity);
    return raid;
}
Also used : RaidEntity(pokeraidbot.infrastructure.jpa.raid.RaidEntity) RaidNotFoundException(pokeraidbot.domain.errors.RaidNotFoundException)

Aggregations

RaidNotFoundException (pokeraidbot.domain.errors.RaidNotFoundException)1 RaidEntity (pokeraidbot.infrastructure.jpa.raid.RaidEntity)1