For each function, f(), g() and h() state how what exceptions should be thrown.
Given these three functions with different exception specifications
What will be an ideal response?
a) void f()throw();
b) void g()throw(int, string);
c) void h();
The function f() should throw no exceptions at all unless the exception is
caught inside of f(). The function g() should throw only int and string type
exceptions. The function h() may throw an exception of any type.
Explanation: Part a) has an empty exception list, prohibiting any exceptions. Part b)
specifies only int and string. Part c) prohibits nothing.
You might also like to view...
The Task Manager's Applications tab reports the name and status for each app, background process, and Windows process that is open and running.
Answer the following statement true (T) or false (F)
____________ provides a standard infrastructure for global electronic business.
Fill in the blank(s) with the appropriate word(s).
The ________ operator determines if a value is found within a set of values
Fill in the blank(s) with correct word
The ssh-agent serves as a(n) ____________________ for any other process.
Fill in the blank(s) with the appropriate word(s).