예제 #1
0
 void c(std::size_t i, const std::system_error &e)
 {
     if (i%2 == 0)
         assert(e.code().value() == operation_aborted);
     else {
         assert(e.code().value() != operation_aborted);
         sum -= i;
     }
 }
예제 #2
0
std::string
to_string(const std::system_error& e) {
    return cocaine::format("[%d] %s", e.code().value(), e.what());
}