194k views
1 vote
From CC Ch 1-4, according to McConnell, what percentage of code is often needed just for exception handling?

User Ricardo C
by
7.4k points

1 Answer

4 votes

Final answer:

In McConnell's book 'Code Complete', exception handling code can take up around 2% to 10% of the total code base.

Step-by-step explanation:

In McConnell's book “Code Complete”, he mentions that exception handling code can take up around 2% to 10% of the total code base, depending on the complexity of the program.

For example, in a program that deals with a lot of potential errors or one that requires extensive error recovery mechanisms, the percentage of code used for exception handling may be closer to 10%.

On the other hand, in a simpler program with fewer potential exceptions, the percentage may be closer to 2%.

User Abdallah Mahmoud
by
8.3k points