27
27
#endif
28
28
29
29
#include < mapbox/variant.hpp>
30
+ #include < boost/exception/diagnostic_information.hpp>
30
31
#include " mlservice.h"
31
32
#include " apidata.h"
32
33
#include " inputconnectorstrategy.h"
@@ -417,7 +418,8 @@ namespace dd
417
418
}
418
419
catch (...)
419
420
{
420
- llog->error (" service creation call failed" );
421
+ llog->error (" service creation call failed: {}" ,
422
+ boost::current_exception_diagnostic_information ());
421
423
throw ;
422
424
}
423
425
}
@@ -455,7 +457,9 @@ namespace dd
455
457
}
456
458
catch (...)
457
459
{
458
- llog->error (" delete service call failed" );
460
+ llog->error (
461
+ " delete service call failed: {}" ,
462
+ boost::current_exception_diagnostic_information ());
459
463
throw ;
460
464
}
461
465
}
@@ -529,7 +533,8 @@ namespace dd
529
533
}
530
534
catch (...)
531
535
{
532
- llog->error (" training call failed" );
536
+ llog->error (" training call failed: {}" ,
537
+ boost::current_exception_diagnostic_information ());
533
538
throw ;
534
539
}
535
540
@@ -568,7 +573,8 @@ namespace dd
568
573
catch (...)
569
574
{
570
575
auto llog = spdlog::get (sname);
571
- llog->error (" training status call failed" );
576
+ llog->error (" training status call failed: {}" ,
577
+ boost::current_exception_diagnostic_information ());
572
578
throw ;
573
579
}
574
580
}
@@ -590,7 +596,8 @@ namespace dd
590
596
catch (...)
591
597
{
592
598
auto llog = spdlog::get (sname);
593
- llog->error (" training delete call failed" );
599
+ llog->error (" training delete call failed: {}" ,
600
+ boost::current_exception_diagnostic_information ());
594
601
throw ;
595
602
}
596
603
}
@@ -635,16 +642,10 @@ namespace dd
635
642
llog->error (" mllib lock error: {}" , e.what ());
636
643
throw ;
637
644
}
638
- catch (const std::exception &e)
639
- {
640
- // catch anything thrown within try block that derives from
641
- // std::exception
642
- llog->error (" other error: {}" , e.what ());
643
- throw ;
644
- }
645
645
catch (...)
646
646
{
647
- llog->error (" prediction call failed" );
647
+ llog->error (" prediction call failed: {}" ,
648
+ boost::current_exception_diagnostic_information ());
648
649
throw ;
649
650
}
650
651
std::chrono::time_point<std::chrono::system_clock> tstop
0 commit comments