Which of the following pseudocodes can be used to handle program exceptions?
If program detects another instance of itself, then kill program instance.
If user enters invalid input, then restart program.
If program module crashes, then restart program module.
If user’s input exceeds buffer length, then truncate the input.
Exception handling is an aspect of secure coding. When errors occur, the system should revert back to a
secure state. This must be coded into the system by the programmer, and should capture all errors and
exceptions that could cause the application or its modules to crash. Restarting the application or module would
ensure that the application reverts back to a secure state.