BreakPadOSX.cpp 716 B

1234567891011121314151617
  1. #include <client/mac/handler/exception_handler.h>
  2. #include "BreakPad.h"
  3. /////////////////////////////////////////////////////////////////////////////////////////
  4. static inline bool BreakPad_MinidumpCallback(const char *dump_dir, const char *minidump_id, void *context, bool succeeded)
  5. {
  6. fprintf(stderr, "****** Plex Media Player CRASHED, CRASH REPORT WRITTEN: %s\n", dump_dir);
  7. return succeeded;
  8. }
  9. /////////////////////////////////////////////////////////////////////////////////////////
  10. void installBreakPadHandler(const QString& name, const QString& destPath)
  11. {
  12. Q_UNUSED(name);
  13. new google_breakpad::ExceptionHandler(destPath.toStdString(), nullptr, BreakPad_MinidumpCallback, nullptr, true, nullptr);
  14. }