adjust example exception behavior to match latest spec

This commit is contained in:
Peter Thorson
2014-12-08 18:56:28 -05:00
parent 6578c5852e
commit 0a47a9a78c
7 changed files with 7 additions and 33 deletions
@@ -67,10 +67,6 @@ public:
m_server.run();
} catch (const std::exception & e) {
std::cout << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
}
@@ -154,7 +150,7 @@ int main() {
t.join();
} catch (std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << e.what() << std::endl;
}
}
+1 -3
View File
@@ -50,10 +50,8 @@ int main() {
// Start the ASIO io_service run loop
echo_server.run();
} catch (const std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
+1 -5
View File
@@ -82,12 +82,8 @@ int main() {
}
con->eof();
}
} catch (const std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
log.close();
}
+1 -5
View File
@@ -78,11 +78,7 @@ int main(int argc, char* argv[]) {
std::cout << "done" << std::endl;
} catch (const std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
}
@@ -42,11 +42,7 @@ int main() {
s.start_accept();
s.run();
} catch (const std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
}
+1 -5
View File
@@ -74,11 +74,7 @@ int main(int argc, char* argv[]) {
std::cout << "done" << std::endl;
} catch (const std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
}
+1 -5
View File
@@ -132,11 +132,7 @@ int main(int argc, char * argv[]) {
}
}
} catch (const std::exception & e) {
} catch (websocketpp::exception const & e) {
std::cout << "exception: " << e.what() << std::endl;
} catch (websocketpp::lib::error_code e) {
std::cout << "error code: " << e.message() << std::endl;
} catch (...) {
std::cout << "other exception" << std::endl;
}
}