| 40 | //------------------------------------------------------------------------- |
| 41 | template <typename ExceptionType, typename Fct> |
| 42 | void AssertThrow(Fct fct, |
| 43 | std::function<void(const ExceptionType&)> exceptionCheck) |
| 44 | { |
| 45 | try |
| 46 | { |
| 47 | fct(); |
| 48 | } |
| 49 | catch (const ExceptionType& e) |
| 50 | { |
| 51 | exceptionCheck(e); |
| 52 | return; |
| 53 | } |
| 54 | catch (...) |
| 55 | { |
| 56 | throw std::runtime_error("Expected exception not raised."); |
| 57 | } |
| 58 | throw std::runtime_error("No exception raised."); |
| 59 | } |
| 60 | } |
nothing calls this directly
no outgoing calls
no test coverage detected