Why is it a bad idea to throw your own exceptions?

Answer Posted / guest

Well, if at that point you know that an error has occurred,
then why not write the proper code to handle that error
instead of passing a new Exception object to the catch
block? Throwing your own exceptions signifies some design
flaws in the project.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cshtml?

519


Is null in c#?

477


What is the difference between protected and internal in c#?

459


Is visual c# free?

503


Can we have two main methods in c#?

532






Why we use get set property in c#?

470


What is a framework in c#?

463


What is the console on a mac?

468


What does return do in for loop?

473


What is strong name assembly?

454


Is it possible to force garbage collector to run?

480


What are the 3 elements of delegation?

489


What is literal in c#?

469


What is satellite assembly? And steps to create satellite assembly?

509


What is the difference between ref and out parameters in c#?

455