LiblinphoneTester: try catch

This commit is contained in:
Gautier Pelloux-Prayer 2016-05-10 16:45:44 +02:00
parent bf82e2d5a9
commit 4eabafc62f

View file

@ -195,7 +195,12 @@ static NSString *const kAllTestsName = @"Run All tests";
if ([test.name isEqualToString:kAllTestsName]) {
testName = nil;
}
BOOL fail = bc_tester_run_tests([testSuite UTF8String], [testName UTF8String], NULL);
BOOL fail = NO;
@try {
fail = bc_tester_run_tests([testSuite UTF8String], [testName UTF8String], NULL);
} @catch (NSException *e) {
fail = YES;
}
if (fail) {
LOGW(@"Test Failed!");
test.state = TestStateFailed;