Roland suspects that a block of code he has written could generate a bunch of exceptions, and he just doesn’t want to deal with it. Here is how he ended up handling it. What does this do? Is it a good idea?
```
try {
// lots of lines of code
}
catch ( Exception e )
{
// do nothing
}
```
This will catch all exceptions of type Exception or any of its descendants. It will not catch exceptions descending from Error, but since these are generally catastrophic (out of memory, JVM error, etc.), there isn’t much a program to do to recover anyway.
The bigger problem is that the catch clause does nothing at all, so the program will continue to execute without having done anything to resolve the problem that generated the exception. It is quite likely that a problem will crop up later and it may be difficult to trace the problem back to its origin in the try block. Since Roland is using Exception as a catch-all (a little joke there), he can’t do anything specific to recover, but he could at least produce a stack trace so the user knows there is a problem and what kind of problem it is.
You might also like to view...
_________ strategies are very conservative and solve the problem of deadlock by limiting access to resources and by imposing restrictions on processes.
Fill in the blank(s) with the appropriate word(s).
Volt-Amp (VA) and wattage (W) ratings for UPS units are interchangeable
Indicate whether the statement is true or false
Which of the following is a network share containing the files required to install roles, role services, and features on Windows Server 2012/R2 servers?
a. Network install cache b. Shared installation folder c. Feature file store d. On-demand file share
To keep a billboard (or backdrop) in a position relative to the camera, set the billboard’s ____ property to camera to cause the billboard to move with the camera.
A. View B. Target C. Angle D. Vehicle