Skip to content

Commit

Permalink
campaignd: Catch boost::bad_function_call exception
Browse files Browse the repository at this point in the history
Isssue found by Coverity.

This exception is thrown if an empty boost::function object is called.
Theoretically should never happen unless the request handlers table
wasn't initialized correctly/was tampered with.
  • Loading branch information
irydacea committed Jun 28, 2014
1 parent 786789b commit 2ac434d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/campaign_server/campaign_server.cpp
Expand Up @@ -731,6 +731,9 @@ int main(int argc, char**argv)
} catch(network::error& e) {
std::cerr << "Aborted with network error: " << e.message << '\n';
return 3;
} catch(boost::bad_function_call& /*e*/) {
std::cerr << "Bad request handler function call\n";
return 4;
}

return 0;
Expand Down

0 comments on commit 2ac434d

Please sign in to comment.