| 556 | |
| 557 | |
| 558 | int getCurrentExceptionCode() |
| 559 | { |
| 560 | try |
| 561 | { |
| 562 | throw; |
| 563 | } |
| 564 | catch (const Exception & e) |
| 565 | { |
| 566 | return e.code(); |
| 567 | } |
| 568 | catch (const Poco::Exception &) |
| 569 | { |
| 570 | return ErrorCodes::POCO_EXCEPTION; |
| 571 | } |
| 572 | catch (const std::exception &) |
| 573 | { |
| 574 | return ErrorCodes::STD_EXCEPTION; |
| 575 | } |
| 576 | catch (...) // Ok: return error code for unknown exception types |
| 577 | { |
| 578 | return ErrorCodes::UNKNOWN_EXCEPTION; |
| 579 | } |
| 580 | } |
| 581 | |
| 582 | int getExceptionErrorCode(std::exception_ptr e) |
| 583 | { |
no test coverage detected