So I am a little confused as to how I am supposed to handle this problem. I have been asked to write a program as part of a job application. It requires me to take in 2 numbers. One of them I need to check if it is an int 1-32, another I have to make sure its bigger than 0.
In the task description it says "throw a GameException".
When then looking into exceptions and creating an exception class, it seems that this is not the right use of exceptions.
Which way would you normally attack this problem?
When then looking into exceptions and creating an exception class, it seems that this is not the right use of exceptions.
What made you think that? – Stefan Nov 6 '15 at 14:10GameException
and how consuming code is expected to use it?" – David Nov 6 '15 at 14:14