Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started