MCPcopy Create free account
hub / github.com/Kong/insomnia / ExitWithWarning

Function ExitWithWarning

packages/insomnia/src/cpp/insomnia.cpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23BOOL DebugMode = FALSE;
24
25int ExitWithWarning(int cmdShow, const wchar_t *msg) {
26 std::wstring finalMsg = std::wstring(msg) + INSOMNIA_ISSUE_REPORT_PREFIX + INSOMNIA_ISSUE_URL +
27 INSOMNIA_ISSUE_REPORT_POSTFIX;
28 if (::MessageBoxW(NULL, finalMsg.c_str(), L"Insomnia was unable to start up properly",
29 MB_YESNO | MB_ICONERROR) == IDYES) {
30 // Open the issue report URL in the default browser
31 ::ShellExecuteW(0, 0, INSOMNIA_ISSUE_URL, NULL, NULL, cmdShow);
32 }
33 return 1;
34}
35
36std::wstring GetTimestamp() {
37 SYSTEMTIME st;

Callers 1

WinMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected