I need help defining the following exeptions using the same template as described below for each question
Question:
I need help defining the following exeptions using the same template as described below for each question
Template:
- What is a possible situation that leads to the exception?
- Who is in charge of throwing the exception: you as a programmer or the runtime system? In theory, should you throw exceptions of this type? Explain your answer.
- If you need to throw the exception, what details would you provide as a message to the user (caller)? What parameters would you include in the message?
- Can the exception be generally caught (and therefore handled)?
- If the exception occurs, should you generally catch this exception type or is it better to pass such exception to the user (caller)? It is not enough to say yes or no; you must provide an argument to support your answer.
- Is the exception a case when you want to avoid this exception to occur in your application in general? If so, what would be your actions as a programmer to avoid it?
The exeption questions:
- NullReferenceException
- IndexOutOfRangeException
- StackOverflowException
- OutOfMemoryException
- DivideByZeroException
- ArgumentNullException
- ArgumentOutOfRangeException
- FormatException
- ArgumentException
- SystemException