Is there a way to cover the following catch block without of course doing test.isRunning.
Try{
Id bId = Func1();
Schema.DescribeSObjectResult result = Obj1.SObjectType.getDescribe();
pageRef = new PageReference('/' + result.getKeyPrefix());
pageRef.setRedirect(true);
}
catch{
// blah blah blah
}
Func1:
public id Func1(){
Id batchProcessId;
ClassA BatchX = new ClassA();
batchProcessId = Database.executeBatch(BatchX);
return batchProcessId;
}