@@ -377,8 +377,6 @@ void RedisConnection::Connect(asio::yield_context& yc)
377
377
}
378
378
379
379
break ;
380
- } catch (const boost::coroutines::detail::forced_unwind&) {
381
- throw ;
382
380
} catch (const std::exception & ex) {
383
381
Log (LogCritical, " IcingaDB" )
384
382
<< " Cannot connect to " << m_Host << " :" << m_Port << " : " << ex.what ();
@@ -408,17 +406,10 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
408
406
for (auto i (item.Amount ); i; --i) {
409
407
ReadOne (yc);
410
408
}
411
- } catch (const boost::coroutines::detail::forced_unwind&) {
412
- throw ;
413
409
} catch (const std::exception & ex) {
414
410
Log (LogCritical, " IcingaDB" )
415
411
<< " Error during receiving the response to a query which has been fired and forgotten: " << ex.what ();
416
412
417
- continue ;
418
- } catch (...) {
419
- Log (LogCritical, " IcingaDB" )
420
- << " Error during receiving the response to a query which has been fired and forgotten" ;
421
-
422
413
continue ;
423
414
}
424
415
@@ -432,9 +423,7 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
432
423
433
424
try {
434
425
reply = ReadOne (yc);
435
- } catch (const boost::coroutines::detail::forced_unwind&) {
436
- throw ;
437
- } catch (...) {
426
+ } catch (const std::exception &) {
438
427
promise.set_exception (std::current_exception ());
439
428
440
429
continue ;
@@ -455,9 +444,7 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
455
444
for (auto i (item.Amount ); i; --i) {
456
445
try {
457
446
replies.emplace_back (ReadOne (yc));
458
- } catch (const boost::coroutines::detail::forced_unwind&) {
459
- throw ;
460
- } catch (...) {
447
+ } catch (const std::exception &) {
461
448
promise.set_exception (std::current_exception ());
462
449
break ;
463
450
}
@@ -551,19 +538,11 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
551
538
552
539
try {
553
540
WriteOne (item, yc);
554
- } catch (const boost::coroutines::detail::forced_unwind&) {
555
- throw ;
556
541
} catch (const std::exception & ex) {
557
542
Log msg (LogCritical, " IcingaDB" , " Error during sending query" );
558
543
LogQuery (item, msg);
559
544
msg << " which has been fired and forgotten: " << ex.what ();
560
545
561
- return ;
562
- } catch (...) {
563
- Log msg (LogCritical, " IcingaDB" , " Error during sending query" );
564
- LogQuery (item, msg);
565
- msg << " which has been fired and forgotten" ;
566
-
567
546
return ;
568
547
}
569
548
@@ -587,19 +566,11 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
587
566
WriteOne (query, yc);
588
567
++i;
589
568
}
590
- } catch (const boost::coroutines::detail::forced_unwind&) {
591
- throw ;
592
569
} catch (const std::exception & ex) {
593
570
Log msg (LogCritical, " IcingaDB" , " Error during sending query" );
594
571
LogQuery (item[i], msg);
595
572
msg << " which has been fired and forgotten: " << ex.what ();
596
573
597
- return ;
598
- } catch (...) {
599
- Log msg (LogCritical, " IcingaDB" , " Error during sending query" );
600
- LogQuery (item[i], msg);
601
- msg << " which has been fired and forgotten" ;
602
-
603
574
return ;
604
575
}
605
576
@@ -618,9 +589,7 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
618
589
619
590
try {
620
591
WriteOne (item.first , yc);
621
- } catch (const boost::coroutines::detail::forced_unwind&) {
622
- throw ;
623
- } catch (...) {
592
+ } catch (const std::exception &) {
624
593
item.second .set_exception (std::current_exception ());
625
594
626
595
return ;
@@ -645,9 +614,7 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
645
614
for (auto & query : item.first ) {
646
615
WriteOne (query, yc);
647
616
}
648
- } catch (const boost::coroutines::detail::forced_unwind&) {
649
- throw ;
650
- } catch (...) {
617
+ } catch (const std::exception &) {
651
618
item.second .set_exception (std::current_exception ());
652
619
653
620
return ;
0 commit comments