125
125
{ \
126
126
(__lt_operation__) ;\
127
127
} \
128
+ catch (std::exception& e) \
129
+ { \
130
+ std::stringstream __lt_ss__; \
131
+ __lt_ss__ << " (" << __lt_file__ << " :" << __lt_line__ << " ) - error in " << " \" " << __lt_name__ << " \" : exceptions thown by " << #__lt_operation__; \
132
+ __lt_ss__ << " [ " << e.what () << " ]" ; \
133
+ LT_SWITCH_MODE (__lt_mode__) \
134
+ } \
128
135
catch (...) \
129
136
{ \
130
137
std::stringstream __lt_ss__; \
@@ -522,12 +529,14 @@ class test : public test_base
522
529
}
523
530
catch (std::exception& e)
524
531
{
525
- std::cout << " Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " set up" << std::endl;
532
+ std::cout << " [FAILURE] Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " set up" << std::endl;
526
533
std::cout << e.what () << std::endl;
534
+ tr->add_failure ();
527
535
}
528
536
catch (...)
529
537
{
530
- std::cout << " Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " set up" << std::endl;
538
+ std::cout << " [FAILURE] Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " set up" << std::endl;
539
+ tr->add_failure ();
531
540
}
532
541
try
533
542
{
@@ -540,16 +549,18 @@ class test : public test_base
540
549
}
541
550
catch (std::exception& e)
542
551
{
543
- std::cout << " Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " run" << std::endl;
552
+ std::cout << " [FAILURE] Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " run" << std::endl;
544
553
std::cout << e.what () << std::endl;
545
554
if (tr->last_checkpoint_line != -1 )
546
555
std::cout << " Last checkpoint in " << tr->last_checkpoint_file << " :" << tr->last_checkpoint_line << std::endl;
556
+ tr->add_failure ();
547
557
}
548
558
catch (...)
549
559
{
550
- std::cout << " Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " run" << std::endl;
560
+ std::cout << " [FAILURE] Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " run" << std::endl;
551
561
if (tr->last_checkpoint_line != -1 )
552
562
std::cout << " Last checkpoint in " << tr->last_checkpoint_file << " :" << tr->last_checkpoint_line << std::endl;
563
+ tr->add_failure ();
553
564
}
554
565
gettimeofday (&after, NULL );
555
566
@@ -569,12 +580,14 @@ class test : public test_base
569
580
}
570
581
catch (std::exception& e)
571
582
{
572
- std::cout << " Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " tear down" << std::endl;
583
+ std::cout << " [FAILURE] Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " tear down" << std::endl;
573
584
std::cout << e.what () << std::endl;
585
+ tr->add_failure ();
574
586
}
575
587
catch (...)
576
588
{
577
- std::cout << " Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " tear down" << std::endl;
589
+ std::cout << " [FAILURE] Exception during " << static_cast <test_impl* >(this )->__lt_name__ << " tear down" << std::endl;
590
+ tr->add_failure ();
578
591
}
579
592
double total = set_up_duration + test_duration + tear_down_duration;
580
593
tr->add_total_time (total);
0 commit comments