+ Start a Discussion
astroastro 

Code Coverage results issue

I have a class which cannot pass because it has alot of try catch blocks.  This class smiply makes calls to another class so it really just contains alot of method calls and each method call is surrounded by a try catch to display a unique message per method called.

 

Is there any way to pass coverage in this way?  I have to have those catches there obviously, even if I put them in the calling class and just return the error message  then my other class will have more code in it and therefore have a lower code coverage result.

 

Any ideas? 

HarmpieHarmpie
I think you should trigger the exceptions from the test code (hard though), so that they are covered by the tests as well.