Question: This exercise is from chapter 7 in the textbook Implement Error Handling Implement divide by zero exception code. Screen shot the code working and showing
This exercise is from chapter in the textbook
Implement Error Handling
Implement divide by zero exception code. Screen shot the code working and showing the error message.
Implement the custom divide by zero exception class based on ApplicationException.
Name your exception class Exception, so if your name is Fred Smith, name your exception class FredSmithException Screen shot the code showing the change.
Override the exception class message property public virtual string Message get; so that it prepends "ITD followed by a colon and space to the exception message
eg instead of Divide by zero it would return ITD: Divide by zero Again screen shot code changes.
Update the DivideNumbers function to throw your new exception. Screen shot any code change you need to do on this one also.
Update the pageLoad code to catch your new exception and output a message that displays an error message AND your name. Screen shot the changes to the code and then screen shot a running where the exception with the new message being thrown.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
