Skip to content
API Documentation
BastionGuard™
anonymous_namespace{PolicyLoaderTests.cpp} Namespace Reference

Functions

template<typename Function>
bool throwsRuntimeError (Function &&function)

Function Documentation

◆ throwsRuntimeError()

template<typename Function>
bool anonymous_namespace{PolicyLoaderTests.cpp}::throwsRuntimeError ( Function && function)

Definition at line 15 of file PolicyLoaderTests.cpp.

16{
17 try {
18 function();
19 } catch (const std::runtime_error&) {
20 return true;
21 }
22 return false;
23}

References throwsRuntimeError().

Referenced by main(), and throwsRuntimeError().