Guest User

Untitled

a guest
Nov 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. void AppFactory::ShowError(bool is_fatal, const char *err_msg, ...)
  2. {
  3. va_list argList;
  4. va_start(argList, err_msg);
  5. #if AUX__WINDOWS
  6. char buf[4096]; // 4 kb
  7. StringCchVPrintf(buf, sizeof(buf), err_msg, argList);
  8. MessageBox(NULL, err_msg, "Error", MB_OK|MB_APPLMODAL|MB_SETFOREGROUND|MB_TOPMOST|MB_ICONERROR);
  9. #endif
  10. vprintf(err_msg, argList);
  11. printf("\n");
  12. va_end(argList);
  13. if (is_fatal)
  14. {
  15. Debug::MiniDump::WriteMinidump();
  16. abort();
  17. }
  18. }
Add Comment
Please, Sign In to add comment