Fix weird crash with bogus reason if deckfile does not exists (now it shows that deck is invalid).
parent
5aaa5ddc02
commit
91668c2964
|
@ -197,7 +197,7 @@ public class DeckUtils {
|
|||
*/
|
||||
public static MagicDeck loadDeckFromFile(final Path deckFilePath) {
|
||||
if (deckFilePath == null || !deckFilePath.toFile().exists()) {
|
||||
return new MagicDeck();
|
||||
throw new InvalidDeckException("File " + deckFilePath + " does not exist");
|
||||
}
|
||||
final List<String> lines = getDeckFileContent(deckFilePath.toString());
|
||||
final MagicDeck deck = DeckParser.parseLines(lines);
|
||||
|
|
Loading…
Reference in New Issue