jpacman-framework icon indicating copy to clipboard operation
jpacman-framework copied to clipboard

Missing proper exception mapdesign without player

Open sven4all opened this issue 11 years ago • 2 comments

If a user tries to parse a map without putting a player on that map, an IndexOutOfBoundsException will be thrown. This exception doesn't tell the user anything about his possible error. It would be better to throw a PacManConfigurationException, because this will tell the user what is going wrong, and gives an indication as to how this problem can be fixed.

sven4all avatar Jun 19 '14 22:06 sven4all

Linking to the fix in #33.

avandeursen avatar Mar 15 '15 13:03 avandeursen

An invariant exists here. Can we close this issue or do we want to turn it into a isEmpty() check which throws the PacManConfigurationException?

TimvdLippe avatar Apr 23 '16 13:04 TimvdLippe