36
36
#include < cstdio>
37
37
#include < iostream>
38
38
#include < random>
39
+ #include < stdexcept>
39
40
#include < vector>
40
41
41
42
#include " tiledb/common/thread_pool/thread_pool.h"
@@ -445,7 +446,7 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
445
446
results.push_back (pool.execute ([&result]() {
446
447
auto tmp = result++;
447
448
if (tmp == 13 ) {
448
- throw std::exception (" Unripe banana" );
449
+ throw std::runtime_error (" Unripe banana" );
449
450
}
450
451
}));
451
452
}
@@ -480,7 +481,7 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
480
481
throw std::string (" Unripe banana" );
481
482
}
482
483
if (tmp == 31 ) {
483
- throw std::exception (" Unbaked potato" );
484
+ throw std::runtime_error (" Unbaked potato" );
484
485
}
485
486
}));
486
487
}
@@ -501,7 +502,7 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
501
502
throw std::string (" Unripe banana" );
502
503
}
503
504
if (tmp == 13 ) {
504
- throw std::exception (" Unbaked potato" );
505
+ throw std::runtime_error (" Unbaked potato" );
505
506
}
506
507
}));
507
508
}
@@ -519,10 +520,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
519
520
results.push_back (pool.execute ([i, &result]() {
520
521
result++;
521
522
if (i == 13 ) {
522
- throw std::exception (" Unripe banana" );
523
+ throw std::runtime_error (" Unripe banana" );
523
524
}
524
525
if (i == 31 ) {
525
- throw std::exception (" Unbaked potato" );
526
+ throw std::runtime_error (" Unbaked potato" );
526
527
}
527
528
}));
528
529
}
@@ -540,10 +541,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
540
541
results.push_back (pool.execute ([i, &result]() {
541
542
++result;
542
543
if (i == 31 ) {
543
- throw (std::exception (" Unripe banana" ));
544
+ throw (std::runtime_error (" Unripe banana" ));
544
545
}
545
546
if (i == 13 ) {
546
- throw std::exception (" Unbaked potato" );
547
+ throw std::runtime_error (" Unbaked potato" );
547
548
}
548
549
}));
549
550
}
0 commit comments