Computer Science, asked by vector2778, 1 year ago

When should you consider Exception Handling strategy?

Answers

Answered by AtifJr
8
★ Exceptions are meant for, well, exceptional cases. What this means is anytime there's a case where a code will cause abnormal failures, you should use exception handling. Like for user input, what happens if the user enters an unexpected value? Tries to divide by zero? What happens if there's an action in your code that could cause an abnormal state to occur (referencing null, accessing an array index out of bounds, tries to access/modify a file that doesn't exist or that doesn't have proper permissions)? These are things you, as the programmer, should be considering. Not all of these have to be program terminating errors, but only if your design addresses things properly.

Havo: In Design Phase

When exceptions are encountered in testing

Never

When exceptions are encountered in Production
Havo: What is the option?
Answered by VineetaGara
17

Exception handling strategy is basically used in programming language of mechanisms,where exception means to denote a specific structure of a particular data which is suppose to be storing all the information in the exceptional conditions.It depends if any of the systems are without the exceptions then the routines would require a special code for error.

Similar questions