سؤال

Does Vibe.D have a build-in terminate function, for when the library is run through a static initializer? I want to terminate the application when vibe.d throws an exception when for example opening a file.

I have a server listening using the listenHTTP function.

هل كانت مفيدة؟

المحلول

Try getEventDriver().exitEventLoop();, from here and here.

EDIT: There's a simpler version, the standalone function vibe.core.core.exitEventLoop.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top