Skip to content

Commit

Permalink
exceptoin handling for ws
Browse files Browse the repository at this point in the history
  • Loading branch information
grrrwaaa committed Mar 7, 2016
1 parent 8e6ebd7 commit 0ff7a1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Binary file modified externals/ws.mxo/Contents/MacOS/ws
Binary file not shown.
15 changes: 10 additions & 5 deletions source/ws/ws.cpp
Expand Up @@ -210,11 +210,16 @@ void Server::on_message(websocketpp::connection_hdl hdl, server::message_ptr msg
void * ws_new(t_symbol *s, long argc, t_atom *argv) {
ws *x = NULL;
if ((x = (ws *)object_alloc(max_class))) {
x = new (x) ws();
// apply attrs:
attr_args_process(x, (short)argc, argv);
// invoke any initialization after the attrs are set from here:
x->post_attr_init();
try {
x = new (x) ws();
// apply attrs:
attr_args_process(x, (short)argc, argv);
// invoke any initialization after the attrs are set from here:
x->post_attr_init();
} catch (const std::exception& e) {
post(e.what());
return NULL;
}
}
return (x);
}
Expand Down

0 comments on commit 0ff7a1d

Please sign in to comment.