Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Select the correct answer. (1) The general syntax to rethrow an exception caught by a catch block is: ____ ( in this case, the same

Select the correct answer.

(1) The general syntax to rethrow an exception caught by a catch block is: ____ ( in this case, the same exception is rethrown ) .

a. rethrow; b. throw;

c. rethrow exception; d. throw exception;

(2) Suppose you have written a program that inputs data from a file. If the input file does not exist when the program executes, then you should choose which option?

a. Terminate the program.

b. Include code in the program to recover from the exception.

c. Log the error and continue.

d. Include code in the header file.

(3) Which of the following options should you choose when an exception occurs in the program that analyzes an airlines ticketing transactions?

a. Terminate the program.

b. Include code in the program to recover from the exception.

c. Log the error and continue.

d. Include code in the header file.

(4) When an exception is thrown in a function, the function-call stack is ____ so that the exception can be caught in the next try/catch block.

a. destroyed b. allocated

c. unbound d. unwound

(5) When an exception is thrown, if the program does not handle the exception, then the function ____ is called to terminate the program.

a. log b. what

c. terminate d. close

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions