Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

– Exception Handling understanding of exception handling. Respond substantively

ID: 3621380 • Letter: #

Question

– Exception Handling

understanding of exception handling. Respond substantively to all four parts.
1)
a)A program contains the statement
throw;

b)Where would you normally expect to find such a statement? What if that statement appeared in a different part of the program?

c) Compare and contrast exception handling with the various other error-
processing schemes.

d)Write a program that demonstrates several exception types being caught with the catch(...) exception handler.

e) Write a program that illustrates rethrowing an exception.

Explanation / Answer

Dear.... 1. An exception is thrown by using the throw keyword from inside the try block and exception handlers are declared with the keyword catch, which must be placed immediately after the try block: EX: try { try { // code here } catch (int n) { throw; } } catch (...) { cout