 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Exception
handling can enhance the behavior of a user
|
|
|
defined
data type (such as a dynamic array) by
|
|
|
performing
error checking.
|
|
| • |
Errors
can occur when new allocates memory or when an
|
|
index
into the array is out of bounds.
|
|
| • |
Errors
can be handled in two ways, either by displaying
|
|
|
an
error message and continuing processing or by
|
|
|
throwing
an exception.
|
|