Difference between revisions of "AS 2019 DisplayErrorMessages"
(Created page with "=Where= The SetupBoard method has a try & catch block, this runs DisplayErrorCode(4), this will be an error when loading the file. The SelectMove method has a try & catch blo...") |
(No difference)
|
Revision as of 08:43, 1 April 2019
Where
The SetupBoard method has a try & catch block, this runs DisplayErrorCode(4), this will be an error when loading the file.
The SelectMove method has a try & catch block, this runs DisplayErrorCode(3), this will be an error cause by entering a non integer value for the Row or Column.
The SelectMove method also runs DisplayErrorCode(1), this be displayed because the piece doesn't exit.
The SelectMove method also runs DisplayErrorCode(2), this will be displayed when the piece you are trying to move can't move. ie it is not in the list of possible moves.
private static void DisplayErrorCode(int errorNumber) { Console.WriteLine("Error " + errorNumber); }