K. Frank
2016-11-03 21:55:44 UTC
Hello List!
Does WServer::start() ever return false, or does it always signal
error conditions by throwing exceptions?
I find the documentation either contradictory or ambiguous.
Thanks.
Does WServer::start() ever return false, or does it always signal
error conditions by throwing exceptions?
I find the documentation either contradictory or ambiguous.
Thanks.
Hello List!
(This is wt-3.3.3 compiled with mingw-w64 on windows 7.)
...
My second questions is about the WServer documentation and
error handling.
WTCONNECTOR_API bool Wt::WServer::start()
Starts the server in the background.
Returns whether the server could be successfully started.
Exceptions
Exception: indicates a problem starting the server.
This seems to be saying that when WServer::start() encounters
an error (regardless of whether my above example counts as
an error), the error condition is reported by returning false and
by throwing an exception. Of course, you can't actually do
both.
Are there two different classes of WServer::start() errors (maybe
for historical reasons), some of which are reported with a false
return value, and others that are reported with a thrown exception?
Anyway, what are the recommended best practices for handling
WServer::start() error conditions?
Thanks.
K. Frank
(This is wt-3.3.3 compiled with mingw-w64 on windows 7.)
...
My second questions is about the WServer documentation and
error handling.
WTCONNECTOR_API bool Wt::WServer::start()
Starts the server in the background.
Returns whether the server could be successfully started.
Exceptions
Exception: indicates a problem starting the server.
This seems to be saying that when WServer::start() encounters
an error (regardless of whether my above example counts as
an error), the error condition is reported by returning false and
by throwing an exception. Of course, you can't actually do
both.
Are there two different classes of WServer::start() errors (maybe
for historical reasons), some of which are reported with a false
return value, and others that are reported with a thrown exception?
Anyway, what are the recommended best practices for handling
WServer::start() error conditions?
Thanks.
K. Frank