- #1
FallArk
- 127
- 0
How would I use function to help with exceptions when the code looks something like this:
Yes, it is part of the snake game.:)
My questions :
1.What is the type runtime_error?
2.Should the function processException be type bool?
Code:
while (true) {
move++;
try {
movePlayer(board, uRow, uCol, move);
moveOpponent(board, oRow, oCol, move);
showBoard(board, move);
}
catch(runtime_error &except) {
processException(except, win);
break;
}
}
My questions :
1.What is the type runtime_error?
2.Should the function processException be type bool?