campaignd: Catch boost::bad_function_call exception

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.
This commit is contained in:
Ignacio R. Morelle 2014-06-28 18:30:30 -04:00
parent 786789b2d7
commit 2ac434dd2c

View file

@ -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;