core: Improve handling of core initialization errors
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 15 Jul 2018 21:48:32 +0000 (23:48 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 17 Jul 2018 17:58:05 +0000 (19:58 +0200)
Since the event loop may not be running while the core is being
initialized, calling exit() does not have the desired effect.
Instead, throw an exception with exit code and error message to
be able to handle this correctly. Exceptions must not be thrown
through the event loop, so ensure that they're caught before in
cases where the event loop was started already.

For the monolithic client, introduce an asynchronous init method
that catches potential exceptions and calls exit() instead. Show
an error popup in the UI if an error message is provided, so the
user gets some feedback before the client is terminated.


No differences found