Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdexcept>
- enum class result_t {
- successful,
- failed
- };
- result_t external_proc();
- void call_external_proc() noexcept {
- const auto result = external_proc();
- if( result_t::failed == result )
- throw std::runtime_error( "external proc failed" );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement