c# SEASON TWO FINAL CHAP 12 pt 1
____ is/are used to facilitate managing exceptions in a consistent, efficient way.
try...catch...finally
All of the following are problem associated with using a generic catch and not specifying an Exception class at all, EXCEPT ____.
you cannot keep the program from terminating abnormally
Which exception class will catch a problem if an attempt is made to access an element stored at location -23 in an array?
System.IndexOutOfRangeException
If a program encounters an error that it cannot recover from, it ____.
raises or throws an exception
A listing of all the methods that are in the execution chain when an exception is thrown is called a(n) ____.
stack trace
Writing a catch clause without an argument list ____.
is the same as writing catch (System.Exception)
Markers placed in an application to indicate the program should halt execution when it reaches that spot is a ____.
breakpoint
When an unexpected error occurs in the try block that throws an exception, control transfers ____.
to the first listed matching catch clause
There are over 70 classes derived from the SystemException class. Which one of the following is NOT a derived class of the SystemException class?
System.ApplicationException
Which of the following preventive actions might be taken to keep your program from crashing?
include if statements that check values used as input
When an unhandled exception message is displayed and you click on the Details button in Visual Studio, ____.
a stack trace of methods with the method that raised the exception listed first is displayed
What order should ArithmeticException, DivideByZeroException, and Exception catch clauses be placed in a try...catch block?
DivideByZeroException, ArithmeticException, Exception
An IO.IOException exception is thrown when ____.
An IO.IOException exception is thrown when ____.
there are problems loading the contents of a file
If an event that creates a problem happens frequently, it is best to write instructions to take care of the problem with ____.
conditional expressions
The code that you want executed, whether an exception is thrown or not, is placed in the ____ block.
finally
C# adheres to a fairly sophisticated set of rules known as C# ____________.
Language Specifications
Custom exceptions must derive from the ____________ class.
ApplicationException
____________ are markers that are placed in an application, indicating the program should halt execution when it reaches that point.
Breakpoints
If several catch clauses are included and one is a generic catch, the generic catch clause should be placed first?
NOT TRUE
When defining your own exception classes, you should use the word "Exception" as part of the identifier.
True
While in debug mode, you can look inside a method and examine the method's program statements using ____.
Step Into
Which of the following would not throw an exception?
division by zero involving floating-point operands
What type of error is associated with a language rule violation?
syntax
When code is included in all three blocks for the try...catch...finally construct, ____.
the try block is attempted first
All exception classes inherit from the ____ class.
Exception
An exception that must be included if you use a specific construct describes a ____ exception.
checked
An attempt to access an element of an array with an index that is outside the bounds of the array throws a ____.
System.IndexOutOfRangeException
When you write your own exceptions, the new class should be derived from ____.
System.ApplicationException
When you write custom exceptions, instead of the CLR raising the exception, you must write program statements that raise the exception, using the keyword ____________.
throw